chrome/browser/google_apis/gdata_wapi_service.cc
// Parses the JSON value to AccountMetadataFeed on the blocking pool and runs
// |callback| on the UI thread once parsing is done.
Parses the JSON value to AccountMetadataFeed on the blocking pool and runs
|callback| on the UI thread once parsing is done.
Parses the JSON value to AccountMetadataFeed on the blocking pool and runs |callback| on the UI thread once parsing is done .
void ParseAccounetMetadataAndRun(const GetAccountMetadataCallback& callback,
                                 GDataErrorCode error,
                                 scoped_ptr<base::Value> value) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  DCHECK(!callback.is_null());
  if (!value) {
    callback.Run(error, scoped_ptr<AccountMetadataFeed>());
    return;
  }
  scoped_ptr<AccountMetadataFeed> entry =
      google_apis::AccountMetadataFeed::CreateFrom(*value);
  if (!entry) {
    callback.Run(GDATA_PARSE_ERROR, scoped_ptr<AccountMetadataFeed>());
    return;
  }
  callback.Run(error, entry.Pass());
}
void ParseAccounetMetadataAndRun ( const GetAccountMetadataCallback & callback , GDataErrorCode error , scoped_ptr < base :: Value > value ) { DCHECK ( BrowserThread :: CurrentlyOn ( BrowserThread :: UI ) ) ; DCHECK ( ! callback . is_null ( ) ) ; if ( ! value ) { callback . Run ( error , scoped_ptr < AccountMetadataFeed > ( ) ) ; return ; } scoped_ptr < AccountMetadataFeed > entry = google_apis :: AccountMetadataFeed :: CreateFrom ( * value ) ; if ( ! entry ) { callback . Run ( GDATA_PARSE_ERROR , scoped_ptr < AccountMetadataFeed > ( ) ) ; return ; } callback . Run ( error , entry . Pass ( ) ) ; }
Parses the JSON value to AccountMetadataFeed on the blocking pool and runs
|callback| on the UI thread once parsing is done.
Parses the JSON value to AccountMetadataFeed on the blocking pool and runs |callback| on the UI thread once parsing is done .
// Parsing AccountMetadataFeed is cheap enough to do on UI thread.