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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 10837250: gdata: Make callback parameter mandatory for GetEntryInfoByPath() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index 9f465e0b5869f7fe5c56ebabf52cc24a617667d3..94909c9ce3a43031f442883034b844b2108b4945 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -1870,6 +1870,8 @@ void GDataFileSystem::GetEntryInfoByPath(const FilePath& file_path,
const GetEntryInfoCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK(!callback.is_null());
+
RunTaskOnUIThread(
base::Bind(&GDataFileSystem::GetEntryInfoByPathAsyncOnUIThread,
ui_weak_ptr_,
@@ -1881,6 +1883,7 @@ void GDataFileSystem::GetEntryInfoByPathAsyncOnUIThread(
const FilePath& file_path,
const GetEntryInfoCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(!callback.is_null());
FindEntryByPathAsyncOnUIThread(
file_path,
@@ -1893,10 +1896,10 @@ void GDataFileSystem::OnGetEntryInfo(const GetEntryInfoCallback& callback,
GDataFileError error,
GDataEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(!callback.is_null());
if (error != GDATA_FILE_OK) {
- if (!callback.is_null())
- callback.Run(error, scoped_ptr<GDataEntryProto>());
+ callback.Run(error, scoped_ptr<GDataEntryProto>());
return;
}
DCHECK(entry);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698