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

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

Issue 11230025: Initialize root resource ID only once for Drive API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/drive/drive_feed_loader.cc
diff --git a/chrome/browser/chromeos/drive/drive_feed_loader.cc b/chrome/browser/chromeos/drive/drive_feed_loader.cc
index 605ceb1430a27a9284dc5c39c26122041a9b90fd..09a1f293e2d29f30eccdb5a5160668ceed79e91e 100644
--- a/chrome/browser/chromeos/drive/drive_feed_loader.cc
+++ b/chrome/browser/chromeos/drive/drive_feed_loader.cc
@@ -381,7 +381,10 @@ void DriveFeedLoader::OnGetAboutResource(
bool changes_detected = true;
int64 largest_changestamp = about_resource->largest_change_id();
- resource_metadata_->InitializeRootEntry(about_resource->root_folder_id());
+
+ // Initialize the root entry only for the first time.
+ if (resource_metadata_->root_resource_id().empty())
+ resource_metadata_->InitializeRootEntry(about_resource->root_folder_id());
if (local_changestamp >= largest_changestamp) {
if (local_changestamp > largest_changestamp) {
« 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