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

Unified Diff: chrome/browser/chromeos/drive/drive_resource_metadata.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
« 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 1334deb8cac2054914469548263233a542d0ef97..5446deea550f870a70af3936f7a32b51265d7849 100644
--- a/chrome/browser/chromeos/drive/drive_resource_metadata.h
+++ b/chrome/browser/chromeos/drive/drive_resource_metadata.h
@@ -340,20 +340,14 @@ class DriveResourceMetadata {
void GetDescendantDirectoryPaths(const std::string& resource_id,
std::set<base::FilePath>* child_directories);
- // Adds a child entry to its parent directory.
- // The method will also do name de-duplication to ensure that the
- // exposed presentation path does not have naming conflicts. Two files with
- // the same name "Foo" will be renames to "Foo (1)" and "Foo (2)".
- void AddEntryToDirectory(const DriveEntryProto& entry);
-
- // Removes the entry from its parent directory.
- void RemoveDirectoryChild(const std::string& child_resource_id);
-
- // Detaches the entry from its parent directory.
- void DetachEntryFromDirectory(const std::string& child_resource_id);
-
- // Removes child elements of directory.
- void RemoveDirectoryChildren(const std::string& directory_resource_id);
+ // Puts an entry under its parent directory. Removes the child from the old
+ // parent if there is. This method will also do name de-duplication to ensure
+ // that the exposed presentation path does not have naming conflicts. Two
+ // files with the same name "Foo" will be renames to "Foo (1)" and "Foo (2)".
+ bool PutEntryUnderDirectory(const DriveEntryProto& entry);
+
+ // Removes the entry and its descendants.
+ bool RemoveEntryRecursively(const std::string& resource_id);
// Converts the children as a vector of DriveEntryProto.
scoped_ptr<DriveEntryProtoVector> DirectoryChildrenToProtoVector(
« 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