| 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..5f4004b7d9d7af7b84093e07d7c419ae4a246bac 100644
|
| --- a/chrome/browser/chromeos/drive/drive_resource_metadata.h
|
| +++ b/chrome/browser/chromeos/drive/drive_resource_metadata.h
|
| @@ -59,10 +59,6 @@ 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:
|
| -// https://developers.google.com/google-apps/documents-list/
|
| -const char kDriveRootDirectoryResourceId[] = "folder:root";
|
| -
|
| // This should be incremented when incompatibility change is made in
|
| // drive.proto.
|
| const int32 kProtoVersion = 2;
|
| @@ -262,6 +258,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;
|
| +
|
| private:
|
| // Initializes the resource map using serialized_resources fetched from the
|
| // database.
|
| @@ -307,6 +307,11 @@ class DriveResourceMetadata {
|
|
|
| scoped_ptr<DriveDirectory> root_; // Stored in the serialized proto.
|
|
|
| + // Retains special resource ID for the root directory across |ClearRoot()|.
|
| + // This must be initialized only once using |InitializeRootEntry()|.
|
| + // This value will be used to look up the root direcotry in |InitFromDB()|.
|
| + std::string saved_root_resource_id_;
|
| +
|
| base::Time last_serialized_;
|
| size_t serialized_size_;
|
| int64 largest_changestamp_; // Stored in the serialized proto.
|
|
|