Chromium Code Reviews| 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 94909c9ce3a43031f442883034b844b2108b4945..6c66a6e4ac709fd5e1941850542945f93d9b5f37 100644 |
| --- a/chrome/browser/chromeos/gdata/gdata_file_system.cc |
| +++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc |
| @@ -560,13 +560,11 @@ void GDataFileSystem::CheckForUpdates() { |
| } |
| void GDataFileSystem::OnUpdateChecked(ContentOrigin initial_origin, |
| - GDataFileError error, |
| - GDataEntry* /* entry */) { |
| + GDataFileError error) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - if (error != GDATA_FILE_OK) { |
| + if (error != GDATA_FILE_OK) |
| directory_service_->set_origin(initial_origin); |
| - } |
| } |
| GDataFileSystem::~GDataFileSystem() { |
| @@ -687,8 +685,9 @@ void GDataFileSystem::FindEntryByPathAsyncOnUIThread( |
| true, // should_load_from_server |
| search_file_path, |
| // This is the initial load, hence we'll notify when it's done. |
| - base::Bind(&GDataFileSystem::RunAndNotifyInitialLoadFinished, |
| + base::Bind(&GDataFileSystem::FindAndNotifyInitialLoadFinished, |
| ui_weak_ptr_, |
| + search_file_path, |
| callback)); |
| return; |
| } |
| @@ -2010,7 +2009,7 @@ void GDataFileSystem::RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo( |
| std::string(), // No search query |
| GURL(), /* feed not explicitly set */ |
| entry_proto->resource_id(), |
| - FindEntryCallback(), // Not used. |
| + FileOperationCallback(), // Not used. |
| base::Bind(&GDataFileSystem::OnRequestDirectoryRefresh, |
| ui_weak_ptr_)); |
| } |
| @@ -2459,7 +2458,7 @@ void GDataFileSystem::SearchAsyncOnUIThread( |
| search_query, |
| next_feed, |
| std::string(), // No directory resource ID. |
| - FindEntryCallback(), // Not used. |
| + FileOperationCallback(), // Not used. |
| base::Bind(&GDataFileSystem::OnSearch, ui_weak_ptr_, callback)); |
| } |
| @@ -2491,7 +2490,7 @@ void GDataFileSystem::LoadRootFeedFromCacheForTesting() { |
| false, // should_load_from_server. |
| // search_path doesn't matter if FindEntryCallback parameter is null . |
| FilePath(), |
| - FindEntryCallback()); |
| + FileOperationCallback()); |
| } |
| GDataFileError GDataFileSystem::UpdateFromFeedForTesting( |
| @@ -2841,14 +2840,15 @@ void GDataFileSystem::NotifyFileSystemToBeUnmounted() { |
| OnFileSystemBeingUnmounted()); |
| } |
| -void GDataFileSystem::RunAndNotifyInitialLoadFinished( |
| +void GDataFileSystem::FindAndNotifyInitialLoadFinished( |
| + const FilePath& search_file_path, |
| const FindEntryCallback& callback, |
| - GDataFileError error, |
| - GDataEntry* entry) { |
| + GDataFileError error) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| DCHECK(!callback.is_null()); |
| - callback.Run(error, entry); |
| + // TODO(satorux): Remove this: crbug.com/141196. |
| + directory_service_->FindEntryByPathAndRunSync(search_file_path, callback); |
|
achuithb
2012/08/14 23:57:36
Why not just fix this? It's easy, right?
satorux1
2012/08/15 00:03:26
I'll fix this in the next patch, which makes thing
|
| DVLOG(1) << "RunAndNotifyInitialLoadFinished"; |