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

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: Remove other resource id check. 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 c5ed5c7ba7a15331bb9dcaaa7069112ed16f5f1b..c56b321d0bc9dd80acfd21c7e469f6b8ea7345ea 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_util.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_util.cc
@@ -93,6 +93,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));
« no previous file with comments | « chrome/browser/chromeos/drive/drive_file_system_util.h ('k') | chrome/browser/chromeos/drive/drive_resource_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698