chrome/browser/chromeos/drive/drive_api_service.cc
// Parses the JSON value into ResourceList and runs |callback|.
Parses the JSON value into ResourceList and runs |callback|.
Parses the JSON value into ResourceList and runs |callback| .
void ParseResourceListAndRun(
    const google_apis::GetResourceListCallback& callback,
    google_apis::GDataErrorCode error,
    scoped_ptr<base::Value> value) {
  if (!value) {
    callback.Run(error, scoped_ptr<google_apis::ResourceList>());
    return;
  }
  scoped_ptr<google_apis::ChangeList> change_list(
      google_apis::ChangeList::CreateFrom(*value));
  if (!change_list) {
    callback.Run(google_apis::GDATA_PARSE_ERROR,
                 scoped_ptr<google_apis::ResourceList>());
    return;
  }
  scoped_ptr<google_apis::ResourceList> resource_list =
      google_apis::ResourceList::CreateFromChangeList(*change_list);
  if (!resource_list) {
    callback.Run(google_apis::GDATA_PARSE_ERROR,
                 scoped_ptr<google_apis::ResourceList>());
    return;
  }
  callback.Run(error, resource_list.Pass());
}
void ParseResourceListAndRun ( const google_apis :: GetResourceListCallback & callback , google_apis :: GDataErrorCode error , scoped_ptr < base :: Value > value ) { if ( ! value ) { callback . Run ( error , scoped_ptr < google_apis :: ResourceList > ( ) ) ; return ; } scoped_ptr < google_apis :: ChangeList > change_list ( google_apis :: ChangeList :: CreateFrom ( * value ) ) ; if ( ! change_list ) { callback . Run ( google_apis :: GDATA_PARSE_ERROR , scoped_ptr < google_apis :: ResourceList > ( ) ) ; return ; } scoped_ptr < google_apis :: ResourceList > resource_list = google_apis :: ResourceList :: CreateFromChangeList ( * change_list ) ; if ( ! resource_list ) { callback . Run ( google_apis :: GDATA_PARSE_ERROR , scoped_ptr < google_apis :: ResourceList > ( ) ) ; return ; } callback . Run ( error , resource_list . Pass ( ) ) ; }
Parses the JSON value into ResourceList and runs |callback|.
Parses the JSON value into ResourceList and runs |callback| .
// TODO(satorux): Parse the JSON value on a blocking pool. crbug.com/165088 // TODO(satorux): Do the conversion on a blocking pool too. crbug.com/165088