Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/gdata.h |
| =================================================================== |
| --- chrome/browser/chromeos/gdata/gdata.h (revision 126063) |
| +++ chrome/browser/chromeos/gdata/gdata.h (working copy) |
| @@ -177,7 +177,6 @@ |
| } |
| private: |
| - |
| // Helper function for StartAuthentication() call. |
| void StartAuthenticationOnUIThread( |
| GDataOperationRegistry* registry, |
| @@ -239,6 +238,47 @@ |
| 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. |
|
satorux1
2012/03/12 17:48:24
nit: add "on the calling thread"
Ben Chan
2012/03/13 00:29:21
Done.
|
| + // |
| + // 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. |
|
satorux1
2012/03/12 17:48:24
ditto.
Ben Chan
2012/03/13 00:29:21
Done.
|
| + // |
| + // 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 |
|
satorux1
2012/03/12 17:48:24
nit: a collection -> a collection (directory)
I t
Ben Chan
2012/03/13 00:29:21
Yes, we should indeed make the terminology/naming
|
| + // |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 +330,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; |