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

Unified Diff: chrome/browser/chromeos/drive/drive_resource_metadata.h

Issue 11227020: Set root resource ID upon full feed update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make root_resource_id() work when root_ is not initialized. 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
Index: chrome/browser/chromeos/drive/drive_resource_metadata.h
diff --git a/chrome/browser/chromeos/drive/drive_resource_metadata.h b/chrome/browser/chromeos/drive/drive_resource_metadata.h
index 195da00228ce673f454d85fb6c67824d93ac4f9e..6bb87f40570f76f4d747e309fe6b7cde29865a31 100644
--- a/chrome/browser/chromeos/drive/drive_resource_metadata.h
+++ b/chrome/browser/chromeos/drive/drive_resource_metadata.h
@@ -59,9 +59,11 @@ enum ContentOrigin {
// name is used in URLs for the file manager, hence user-visible.
const FilePath::CharType kDriveRootDirectory[] = FILE_PATH_LITERAL("drive");
-// The resource ID for the root directory is defined in the spec:
+// The resource ID for the root directory for WAPI is defined in the spec:
// https://developers.google.com/google-apps/documents-list/
-const char kDriveRootDirectoryResourceId[] = "folder:root";
+// Note that this special ID only applies to WAPI. Drive uses a non-constant
+// unique ID given in About resource.
+const char kWAPIRootDirectoryResourceId[] = "folder:root";
// This should be incremented when incompatibility change is made in
// drive.proto.
@@ -262,6 +264,10 @@ class DriveResourceMetadata {
const FileOperationCallback& callback);
void SaveToDB();
+ // Returns the resource ID of the root directory or empty string if it is
+ // not initialized.
+ const std::string root_resource_id() const;
satorux1 2012/10/23 08:06:26 Drop the first const. Besides, this seems to be o
kochi 2012/10/23 08:21:21 Done.
+
private:
// Initializes the resource map using serialized_resources fetched from the
// database.

Powered by Google App Engine
This is Rietveld 408576698