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

Unified Diff: chrome/browser/chromeos/gdata/gdata.h

Issue 9662041: Implement copy and move operations within the same remote file system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase to HEAD Created 8 years, 9 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/gdata/gdata.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata.h
===================================================================
--- chrome/browser/chromeos/gdata/gdata.h (revision 126358)
+++ chrome/browser/chromeos/gdata/gdata.h (working copy)
@@ -177,7 +177,6 @@
}
private:
-
// Helper function for StartAuthentication() call.
void StartAuthenticationOnUIThread(
GDataOperationRegistry* registry,
@@ -199,6 +198,9 @@
// This defines an interface for sharing by DocumentService and
// MockDocumentService so that we can do testing of clients of DocumentService.
+//
+// TODO(zel,benchan): Make the terminology/naming convention (e.g. file vs
+// document vs resource, directory vs collection) more consistent and precise.
class DocumentsServiceInterface {
public:
virtual ~DocumentsServiceInterface() {}
@@ -239,6 +241,48 @@
DocumentExportFormat format,
const DownloadActionCallback& callback) = 0;
+ // Makes a copy of a document identified by its 'self' link |document_url|.
+ // The copy is named as the UTF-8 encoded |new_name| and is not added to any
+ // collection. Use AddResourceToDirectory() to add the copy to a collection
+ // when needed. Upon completion, invokes |callback| with results on the
+ // calling thread.
+ //
+ // Can be called on any thread.
+ virtual void CopyDocument(const GURL& document_url,
+ const FilePath::StringType& new_name,
+ const GetDataCallback& callback) = 0;
+
+ // Renames a document or collection identified by its 'self' link
+ // |document_url| to the UTF-8 encoded |new_name|. Upon completion,
+ // invokes |callback| with results on the calling thread.
+ //
+ // Can be called on any thread.
+ virtual void RenameResource(const GURL& resource_url,
+ const FilePath::StringType& new_name,
+ const EntryActionCallback& callback) = 0;
+
+ // Adds a resource (document, file, or collection) identified by its
+ // 'self' link |resource_url| to a collection with a content link
+ // |parent_content_url|. Upon completion, invokes |callback| with
+ // results on the calling thread.
+ //
+ // Can be called on any thread.
+ virtual void AddResourceToDirectory(const GURL& parent_content_url,
+ const GURL& resource_url,
+ const EntryActionCallback& callback) = 0;
+
+ // Removes a resource (document, file, collection) identified by its
+ // 'self' link |resource_url| from a collection with a content link
+ // |parent_content_url|. Upon completion, invokes |callback| with
+ // results on the calling thread.
+ //
+ // Can be called on any thread.
+ virtual void RemoveResourceFromDirectory(
+ const GURL& parent_content_url,
+ const GURL& resource_url,
+ const std::string& resource_id,
+ const EntryActionCallback& callback) = 0;
+
// Creates new collection with |directory_name| under parent directory
// identified with |parent_content_url|. If |parent_content_url| is empty,
// the new collection will be created in the root. Upon completion,
@@ -290,6 +334,21 @@
const GURL& content_url,
DocumentExportFormat format,
const DownloadActionCallback& callback) OVERRIDE;
+ virtual void CopyDocument(const GURL& document_url,
+ const FilePath::StringType& new_name,
+ const GetDataCallback& callback) OVERRIDE;
+ virtual void RenameResource(const GURL& document_url,
+ const FilePath::StringType& new_name,
+ const EntryActionCallback& callback) OVERRIDE;
+ virtual void AddResourceToDirectory(
+ const GURL& parent_content_url,
+ const GURL& resource_url,
+ const EntryActionCallback& callback) OVERRIDE;
+ virtual void RemoveResourceFromDirectory(
+ const GURL& parent_content_url,
+ const GURL& resource_url,
+ const std::string& resource_id,
+ const EntryActionCallback& callback) OVERRIDE;
virtual void CreateDirectory(const GURL& parent_content_url,
const FilePath::StringType& directory_name,
const GetDataCallback& callback) OVERRIDE;
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698