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

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

Issue 12585003: drive: Add showroot=true to WAPI feed URLs and ignore "no parent" entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests. 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/change_list_processor.cc
diff --git a/chrome/browser/chromeos/drive/change_list_processor.cc b/chrome/browser/chromeos/drive/change_list_processor.cc
index fce8ccdf0711b3a8204e333ba4c417b51db208c6..dbde1292650f749ff700e06b2bb87130e0dc0011 100644
--- a/chrome/browser/chromeos/drive/change_list_processor.cc
+++ b/chrome/browser/chromeos/drive/change_list_processor.cc
@@ -352,6 +352,18 @@ void ChangeListProcessor::FeedToEntryProtoMap(
if (entry_proto.resource_id().empty())
continue;
+ // TODO(haruki): Apply mapping from an empty parent to special dummy
+ // directory here or in ConvertResourceEntryToDriveEntryProto. See
+ // http://crbug.com/174233 http://crbug.com/171207. Until we implement it,
+ // ChangeListProcessor ignores such "no parent" entries.
+ // Please note that this will cause a temporal issue when
+ // - The user unselect all the parent using drive.google.com UI.
+ // ChangeListProcessor just ignores the incoming changes and keeps stale
+ // metadata. We need to work on this ASAP to reduce confusion.
+ if (entry_proto.parent_resource_id().empty()) {
+ continue;
+ }
+
// Count the number of files.
if (uma_stats && !entry_proto.file_info().is_directory()) {
uma_stats->IncrementNumFiles(
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698