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

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

Issue 13866009: Remove root resource id aliasing from DriveResourceMetadata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/drive_file_system_util.cc
diff --git a/chrome/browser/chromeos/drive/drive_file_system_util.cc b/chrome/browser/chromeos/drive/drive_file_system_util.cc
index d390f718a088769e005086d429b114ed9e16dddd..eb7e842e2c78183585d25ab237eb46c210014358 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_util.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_util.cc
@@ -160,6 +160,24 @@ bool IsSpecialResourceId(const std::string& resource_id) {
resource_id == kDriveOtherDirSpecialResourceId;
}
+DriveEntryProto CreateMyDriveRootEntry(const std::string& root_resource_id) {
+ DriveEntryProto mydrive_root;
+ mydrive_root.mutable_file_info()->set_is_directory(true);
+ mydrive_root.set_resource_id(root_resource_id);
+ mydrive_root.set_parent_resource_id(util::kDriveGrandRootSpecialResourceId);
+ mydrive_root.set_title(util::kDriveMyDriveRootDirName);
+ return mydrive_root;
+}
+
+DriveEntryProto CreateOtherDirEntry() {
+ DriveEntryProto other_dir;
+ other_dir.mutable_file_info()->set_is_directory(true);
+ other_dir.set_resource_id(util::kDriveOtherDirSpecialResourceId);
+ other_dir.set_parent_resource_id(util::kDriveGrandRootSpecialResourceId);
+ other_dir.set_title(util::kDriveOtherDirName);
+ return other_dir;
+}
+
const std::string& GetDriveMountPointPathAsString() {
CR_DEFINE_STATIC_LOCAL(std::string, drive_mount_path_string,
(kDriveMountPointPath));

Powered by Google App Engine
This is Rietveld 408576698