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

Unified Diff: chrome/browser/chromeos/drive/change_list_loader.cc

Issue 12588009: drive: Pass through AboutResouce from server among callbacks in ChangeListLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
Index: chrome/browser/chromeos/drive/change_list_loader.cc
diff --git a/chrome/browser/chromeos/drive/change_list_loader.cc b/chrome/browser/chromeos/drive/change_list_loader.cc
index 41451a9f403f9535808e300c25b7f3f47e7d43f8..9fe8ae856af9746fe86ae0224b1c72abd3f6d602 100644
--- a/chrome/browser/chromeos/drive/change_list_loader.cc
+++ b/chrome/browser/chromeos/drive/change_list_loader.cc
@@ -296,6 +296,10 @@ void ChangeListLoader::LoadFromServerIfNeededAfterGetAbout(
if (util::GDataToDriveFileError(status) == DRIVE_FILE_OK) {
DCHECK(about_resource);
remote_changestamp = about_resource->largest_change_id();
+
+ DVLOG(1) << "Root folder ID is " << about_resource->root_folder_id();
+ DCHECK(!about_resource->root_folder_id().empty());
+ drive_root_resource_id_ = about_resource->root_folder_id();
hidehiko 2013/03/15 06:57:44 How about passing through AboutResource to L761 vi
Haruki Sato 2013/03/18 04:20:25 Done.
}
resource_metadata_->GetLargestChangestamp(
@@ -445,7 +449,8 @@ void ChangeListLoader::DoLoadDirectoryFromServerAfterLoad(
// Do not use |change_list_processor_| as it may be in use for other
// purposes.
- ChangeListProcessor change_list_processor(resource_metadata_);
+ ChangeListProcessor change_list_processor(resource_metadata_,
+ drive_root_resource_id_);
change_list_processor.FeedToEntryProtoMap(resource_list, NULL, NULL);
resource_metadata_->RefreshDirectory(
directory_fetch_info,
@@ -753,7 +758,8 @@ void ChangeListLoader::UpdateFromFeed(
DCHECK(!update_finished_callback.is_null());
DVLOG(1) << "Updating directory with a feed";
- change_list_processor_.reset(new ChangeListProcessor(resource_metadata_));
+ change_list_processor_.reset(
+ new ChangeListProcessor(resource_metadata_, drive_root_resource_id_));
// Don't send directory content change notification while performing
// the initial content retrieval.
const bool should_notify_changed_directories = is_delta_feed;

Powered by Google App Engine
This is Rietveld 408576698