chrome/browser/drive/gdata_wapi_service.cc
// Parses the JSON value to ResourceEntry runs |callback|.
Parses the JSON value to ResourceEntry runs |callback|.
Parses the JSON value to ResourceEntry runs |callback| .
void ParseResourceEntryAndRun(const GetResourceEntryCallback& callback,
                              GDataErrorCode error,
                              scoped_ptr<base::Value> value) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  if (!value) {
    callback.Run(error, scoped_ptr<ResourceEntry>());
    return;
  }
  scoped_ptr<ResourceEntry> entry =
      google_apis::ResourceEntry::ExtractAndParse(*value);
  if (!entry) {
    callback.Run(GDATA_PARSE_ERROR, scoped_ptr<ResourceEntry>());
    return;
  }
  callback.Run(error, entry.Pass());
}
void ParseResourceEntryAndRun ( const GetResourceEntryCallback & callback , GDataErrorCode error , scoped_ptr < base :: Value > value ) { DCHECK ( BrowserThread :: CurrentlyOn ( BrowserThread :: UI ) ) ; if ( ! value ) { callback . Run ( error , scoped_ptr < ResourceEntry > ( ) ) ; return ; } scoped_ptr < ResourceEntry > entry = google_apis :: ResourceEntry :: ExtractAndParse ( * value ) ; if ( ! entry ) { callback . Run ( GDATA_PARSE_ERROR , scoped_ptr < ResourceEntry > ( ) ) ; return ; } callback . Run ( error , entry . Pass ( ) ) ; }
Parses the JSON value to ResourceEntry runs |callback|.
Parses the JSON value to ResourceEntry runs |callback| .
// Parsing ResourceEntry is cheap enough to do on UI thread.