chrome/browser/google_apis/gdata_wapi_service.cc
// Parses the JSON value to ResourceList on the blocking pool and runs
// |callback| on the UI thread once parsing is done.
Parses the JSON value to ResourceList on the blocking pool and runs
|callback| on the UI thread once parsing is done.
Parses the JSON value to ResourceList on the blocking pool and runs |callback| on the UI thread once parsing is done .
void ParseResourceListAndRun(const GetResourceListCallback& callback,
                             GDataErrorCode error,
                             scoped_ptr<base::Value> value) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  DCHECK(!callback.is_null());
  if (!value) {
    callback.Run(error, scoped_ptr<ResourceList>());
    return;
  }
  base::PostTaskAndReplyWithResult(
      BrowserThread::GetBlockingPool(),
      FROM_HERE,
      base::Bind(&ParseResourceListOnBlockingPool, base::Passed(&value)),
      base::Bind(&DidParseResourceListOnBlockingPool, callback, error));
}
void ParseResourceListAndRun ( const GetResourceListCallback & callback , GDataErrorCode error , scoped_ptr < base :: Value > value ) { DCHECK ( BrowserThread :: CurrentlyOn ( BrowserThread :: UI ) ) ; DCHECK ( ! callback . is_null ( ) ) ; if ( ! value ) { callback . Run ( error , scoped_ptr < ResourceList > ( ) ) ; return ; } base :: PostTaskAndReplyWithResult ( BrowserThread :: GetBlockingPool ( ) , FROM_HERE , base :: Bind ( & ParseResourceListOnBlockingPool , base :: Passed ( & value ) ) , base :: Bind ( & DidParseResourceListOnBlockingPool , callback , error ) ) ; }
Parses the JSON value to ResourceList on the blocking pool and runs
|callback| on the UI thread once parsing is done.
Parses the JSON value to ResourceList on the blocking pool and runs |callback| on the UI thread once parsing is done .