Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Issue 10831076: gdata: Get rid of callback from GDataDirectoryService::FindEntryByPath() (Closed)

Created:
8 years, 4 months ago by satorux1
Modified:
8 years, 4 months ago
Reviewers:
achuithb
CC:
chromium-reviews, achuith+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

gdata: Get rid of callback from GDataDirectoryService::FindEntryByPath() It didn't make sense to have a callback parameter, as this was a synchronous function. Changed the function to return a pointer instead. Along the way, rename the function to FindEntryByPathSync(). Replace GDataFileSystem::GetGDataEntryByPath() with FindEntryByPathSync(). BUG=137160 TEST=out/Release/unit_tests --gtest_filter=GData* && out/Release/browser_tests --gtest_filter=GData* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=149048

Patch Set 1 #

Total comments: 2

Patch Set 2 : address comments #

Patch Set 3 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -59 lines) Patch
M chrome/browser/chromeos/gdata/gdata_file_system.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 15 chunks +25 lines, -37 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_files.cc View 3 chunks +8 lines, -15 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
satorux1
8 years, 4 months ago (2012-07-30 20:55:16 UTC) #1
achuithb
Nice bit of cleanup. lgtm https://chromiumcodereview.appspot.com/10831076/diff/1/chrome/browser/chromeos/gdata/gdata_file_system.cc File chrome/browser/chromeos/gdata/gdata_file_system.cc (right): https://chromiumcodereview.appspot.com/10831076/diff/1/chrome/browser/chromeos/gdata/gdata_file_system.cc#newcode971 chrome/browser/chromeos/gdata/gdata_file_system.cc:971: if (entry) Alternatively, you ...
8 years, 4 months ago (2012-07-30 21:54:40 UTC) #2
satorux1
8 years, 4 months ago (2012-07-30 22:10:39 UTC) #3
https://chromiumcodereview.appspot.com/10831076/diff/1/chrome/browser/chromeo...
File chrome/browser/chromeos/gdata/gdata_file_system.cc (right):

https://chromiumcodereview.appspot.com/10831076/diff/1/chrome/browser/chromeo...
chrome/browser/chromeos/gdata/gdata_file_system.cc:971: if (entry)
On 2012/07/30 21:54:40, achuith.bhandarkar wrote:
> Alternatively, you could do:
> callback.Run(entry ? GDATA_FILE_OK : GDATA_FILE_ERROR_NOT_FOUND, entry);
> or you could pull error out if you think that's too cryptic:
> const GDataErrorCode error = entry ? GDATA_FILE_OK :
GDATA_FILE_ERROR_NOT_FOUND;
> callback.Run(error, entry);

Done.

Powered by Google App Engine
This is Rietveld 408576698