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

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

Issue 14108009: chromeos: Use WriteBatch to update DriveResourceMetadata DB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename method 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_resource_metadata_storage.h
diff --git a/chrome/browser/chromeos/drive/drive_resource_metadata_storage.h b/chrome/browser/chromeos/drive/drive_resource_metadata_storage.h
index 40c78ca5a72e9c816f98c2042998291c6c41a247..2566b79135130c4b9e6bb41c8b5cc2c64bc044c0 100644
--- a/chrome/browser/chromeos/drive/drive_resource_metadata_storage.h
+++ b/chrome/browser/chromeos/drive/drive_resource_metadata_storage.h
@@ -45,22 +45,17 @@ class DriveResourceMetadataStorage {
int64 GetLargestChangestamp();
// Puts the entry to this storage.
- void PutEntry(const DriveEntryProto& entry);
+ bool PutEntry(const DriveEntryProto& entry);
// Returns an entry stored in this storage.
scoped_ptr<DriveEntryProto> GetEntry(const std::string& resource_id);
// Removes an entry from this storage.
- void RemoveEntry(const std::string& resource_id);
+ bool RemoveEntry(const std::string& resource_id);
// Iterates over entries stored in this storage.
void Iterate(const IterateCallback& callback);
- // Puts child under the parent.
- void PutChild(const std::string& parent_resource_id,
- const std::string& child_name,
- const std::string& child_resource_id);
-
// Returns resource ID of the parent's child.
std::string GetChild(const std::string& parent_resource_id,
const std::string& child_name);
@@ -69,13 +64,13 @@ class DriveResourceMetadataStorage {
void GetChildren(const std::string& parent_resource_id,
std::vector<std::string>* children);
- // Removes child from the parent.
- void RemoveChild(const std::string& parent_resource_id,
- const std::string& child_name);
-
private:
friend class DriveResourceMetadataStorageTest;
+ // Returns a string to be used as a key for child entry.
+ static std::string GetChildEntryKey(const std::string& parent_resource_id,
+ const std::string& child_name);
+
// Puts header.
void PutHeader(const DriveResourceMetadataHeader& header);

Powered by Google App Engine
This is Rietveld 408576698