chrome/browser/chromeos/drive/drive_api_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 google_apis::GetAccountMetadataCallback& callback,
    google_apis::GDataErrorCode error,
    scoped_ptr<base::Value> value) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  DCHECK(!callback.is_null());
  if (!value) {
    callback.Run(error, scoped_ptr<google_apis::AccountMetadataFeed>());
    return;
  }
  scoped_ptr<google_apis::AboutResource> about_resource =
      google_apis::AboutResource::CreateFrom(*value);
  callback.Run(google_apis::GDATA_PARSE_ERROR,
               scoped_ptr<google_apis::AccountMetadataFeed>());
}
void ParseAccounetMetadataAndRun ( const google_apis :: GetAccountMetadataCallback & callback , google_apis :: GDataErrorCode error , scoped_ptr < base :: Value > value ) { DCHECK ( BrowserThread :: CurrentlyOn ( BrowserThread :: UI ) ) ; DCHECK ( ! callback . is_null ( ) ) ; if ( ! value ) { callback . Run ( error , scoped_ptr < google_apis :: AccountMetadataFeed > ( ) ) ; return ; } scoped_ptr < google_apis :: AboutResource > about_resource = google_apis :: AboutResource :: CreateFrom ( * value ) ; callback . Run ( google_apis :: GDATA_PARSE_ERROR , scoped_ptr < google_apis :: AccountMetadataFeed > ( ) ) ; }
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 AboutResource is cheap enough to do on UI thread. // TODO(satorux): Convert AboutResource to AccountMetadataFeed. // For now just returning an error. crbug.com/165621