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

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

Issue 13456002: drive: Fills no-parent entiries in "/drive/other". (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/resource_entry_conversion.cc
diff --git a/chrome/browser/chromeos/drive/resource_entry_conversion.cc b/chrome/browser/chromeos/drive/resource_entry_conversion.cc
index 725671b39d74f72fc0fb80ac6c8a6315523429cd..bdd7a937cd5de4f682b8cc4859c5eb74c09a7781 100644
--- a/chrome/browser/chromeos/drive/resource_entry_conversion.cc
+++ b/chrome/browser/chromeos/drive/resource_entry_conversion.cc
@@ -55,13 +55,14 @@ DriveEntryProto ConvertResourceEntryToDriveEntryProto(
const google_apis::Link* parent_link =
entry.GetLinkByType(google_apis::Link::LINK_PARENT);
if (parent_link) {
- // TODO(haruki): Apply mapping from an empty parent to special dummy
- // directory. See http://crbug.com/174233. Until we implement it,
- // ChangeListProcessor ignores such "no parent" entries.
entry_proto.set_parent_resource_id(
util::ExtractResourceIdFromUrl(parent_link->href()));
}
+ // Apply mapping from an empty parent to the special dummy directory.
+ if (entry_proto.parent_resource_id().empty())
+ entry_proto.set_parent_resource_id(util::kDriveOtherDirSpecialResourceId);
kinaba 2013/04/03 05:39:33 I'm not sure if this is the right place for this m
kinaba 2013/04/03 05:59:55 Chatted offline, and inclined to feel ok to put it
Haruki Sato 2013/04/03 06:49:43 Done.
+
entry_proto.set_deleted(entry.deleted());
entry_proto.set_kind(entry.kind());
entry_proto.set_shared_with_me(HasSharedWithMeLabel(entry));

Powered by Google App Engine
This is Rietveld 408576698