| Index: chrome/browser/google_apis/drive_api_service.cc
|
| diff --git a/chrome/browser/google_apis/drive_api_service.cc b/chrome/browser/google_apis/drive_api_service.cc
|
| index 546e3a176f06f5daf434ee02ee6baf8a79b733a6..1ca519882cd581d9309f245ea9c46f4890ada8a7 100644
|
| --- a/chrome/browser/google_apis/drive_api_service.cc
|
| +++ b/chrome/browser/google_apis/drive_api_service.cc
|
| @@ -88,11 +88,11 @@ void ParseResourceListOnBlockingPoolAndRun(
|
| callback, base::Owned(error)));
|
| }
|
|
|
| -// Parses the JSON value to ResourceEntry runs |callback|.
|
| +// Parses the FileResource value to ResourceEntry and runs |callback|.
|
| void ParseResourceEntryAndRun(
|
| const GetResourceEntryCallback& callback,
|
| GDataErrorCode error,
|
| - scoped_ptr<base::Value> value) {
|
| + scoped_ptr<FileResource> value) {
|
| DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| if (!value) {
|
| @@ -100,16 +100,9 @@ void ParseResourceEntryAndRun(
|
| return;
|
| }
|
|
|
| - // Parsing FileResource is cheap enough to do on UI thread.
|
| - scoped_ptr<FileResource> file_resource = FileResource::CreateFrom(*value);
|
| - if (!file_resource) {
|
| - callback.Run(GDATA_PARSE_ERROR, scoped_ptr<ResourceEntry>());
|
| - return;
|
| - }
|
| -
|
| // Converting to ResourceEntry is cheap enough to do on UI thread.
|
| scoped_ptr<ResourceEntry> entry =
|
| - ResourceEntry::CreateFromFileResource(*file_resource);
|
| + ResourceEntry::CreateFromFileResource(*value);
|
| if (!entry) {
|
| callback.Run(GDATA_PARSE_ERROR, scoped_ptr<ResourceEntry>());
|
| return;
|
|
|