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

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: 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_resource_metadata.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6c3439573491f5426d49bec6f4e8f5222fa1eb9f..83a6d81b22f2d197f3c6c3d00e18702186bfffbc 100644
--- a/chrome/browser/chromeos/drive/drive_resource_metadata.h
+++ b/chrome/browser/chromeos/drive/drive_resource_metadata.h
@@ -261,6 +261,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 { return root_resource_id_; }
+
private:
// Initializes the resource map using serialized_resources fetched from the
// database.
@@ -306,6 +310,10 @@ class DriveResourceMetadata {
scoped_ptr<DriveDirectory> root_; // Stored in the serialized proto.
+ // Retains special resource ID for the root directory.
+ // This must be initialized only once using |InitializeRootEntry()|.
+ std::string root_resource_id_;
+
base::Time last_serialized_;
size_t serialized_size_;
int64 largest_changestamp_; // Stored in the serialized proto.
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_resource_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698