Index: chrome/browser/chromeos/drive/drive_service_interface.h |
diff --git a/chrome/browser/chromeos/drive/drive_service_interface.h b/chrome/browser/chromeos/drive/drive_service_interface.h |
index c82b273901c7ebd806dd07aa1cc50a2f661846fa..422cacb8e917b336c3d05ed5e8a15baa7f66591f 100644 |
--- a/chrome/browser/chromeos/drive/drive_service_interface.h |
+++ b/chrome/browser/chromeos/drive/drive_service_interface.h |
@@ -9,13 +9,13 @@ |
// TODO(kochi): Further split gdata_operations.h and include only necessary |
// headers. http://crbug.com/141469 |
-// DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams |
+// gdata::DownloadActionCallback/gdata::InitiateUploadParams/ResulmeUploadParams |
hashimoto
2012/10/12 04:57:46
extremely tiny nit: I think OLD comment looks nice
satorux1
2012/10/12 05:32:56
Agreed. Done
|
#include "chrome/browser/google_apis/gdata_operations.h" |
#include "chrome/browser/google_apis/operations_base.h" |
class Profile; |
-namespace gdata { |
+namespace drive { |
class OperationRegistry; |
@@ -48,10 +48,11 @@ class DriveServiceObserver { |
virtual void OnReadyToPerformOperations() {} |
// Called when an operation started, made some progress, or finished. |
- virtual void OnProgressUpdate(const OperationProgressStatusList& list) {} |
+ virtual void OnProgressUpdate( |
+ const gdata::OperationProgressStatusList& list) {} |
// Called when GData authentication failed. |
- virtual void OnAuthenticationFailed(GDataErrorCode error) {} |
+ virtual void OnAuthenticationFailed(gdata::GDataErrorCode error) {} |
protected: |
virtual ~DriveServiceObserver() {} |
@@ -91,14 +92,14 @@ class DriveServiceInterface { |
virtual bool CancelForFilePath(const FilePath& file_path) = 0; |
// Obtains the list of currently active operations. |
- virtual OperationProgressStatusList GetProgressStatusList() const = 0; |
+ virtual gdata::OperationProgressStatusList GetProgressStatusList() const = 0; |
// Authentication service: |
// Authenticates the user by fetching the auth token as |
// needed. |callback| will be run with the error code and the auth |
// token, on the thread this function is run. |
- virtual void Authenticate(const AuthStatusCallback& callback) = 0; |
+ virtual void Authenticate(const gdata::AuthStatusCallback& callback) = 0; |
// True if OAuth2 access token is retrieved and believed to be fresh. |
virtual bool HasAccessToken() const = 0; |
@@ -127,35 +128,36 @@ class DriveServiceInterface { |
int64 start_changestamp, |
const std::string& search_query, |
const std::string& directory_resource_id, |
- const GetDataCallback& callback) = 0; |
+ const gdata::GetDataCallback& callback) = 0; |
// Fetches single entry metadata from server. The entry's resource id equals |
// |resource_id|. |
// Upon completion, invokes |callback| with results on the calling thread. |
virtual void GetDocumentEntry(const std::string& resource_id, |
- const GetDataCallback& callback) = 0; |
+ const gdata::GetDataCallback& callback) = 0; |
// Gets the account metadata from the server using the default account |
// metadata URL. Upon completion, invokes |callback| with results on the |
// calling thread. |
- virtual void GetAccountMetadata(const GetDataCallback& callback) = 0; |
+ virtual void GetAccountMetadata(const gdata::GetDataCallback& callback) = 0; |
// Gets the application information from the server. |
// Upon completion, invokes |callback| with results on the calling thread. |
- virtual void GetApplicationInfo(const GetDataCallback& callback) = 0; |
+ virtual void GetApplicationInfo(const gdata::GetDataCallback& callback) = 0; |
// Deletes a document identified by its 'self' |url| and |etag|. |
// Upon completion, invokes |callback| with results on the calling thread. |
virtual void DeleteDocument(const GURL& document_url, |
- const EntryActionCallback& callback) = 0; |
+ const gdata::EntryActionCallback& callback) = 0; |
// Downloads a document identified by its |content_url| in a given |format|. |
// Upon completion, invokes |callback| with results on the calling thread. |
- virtual void DownloadDocument(const FilePath& virtual_path, |
- const FilePath& local_cache_path, |
- const GURL& content_url, |
- DocumentExportFormat format, |
- const DownloadActionCallback& callback) = 0; |
+ virtual void DownloadDocument( |
+ const FilePath& virtual_path, |
+ const FilePath& local_cache_path, |
+ const GURL& content_url, |
+ DocumentExportFormat format, |
+ const gdata::DownloadActionCallback& callback) = 0; |
// Makes a copy of a document identified by its |resource_id|. |
// The copy is named as the UTF-8 encoded |new_name| and is not added to any |
@@ -164,22 +166,23 @@ class DriveServiceInterface { |
// calling thread. |
virtual void CopyDocument(const std::string& resource_id, |
const FilePath::StringType& new_name, |
- const GetDataCallback& callback) = 0; |
+ const gdata::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. |
virtual void RenameResource(const GURL& resource_url, |
const FilePath::StringType& new_name, |
- const EntryActionCallback& callback) = 0; |
+ const gdata::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. |
- virtual void AddResourceToDirectory(const GURL& parent_content_url, |
- const GURL& resource_url, |
- const EntryActionCallback& callback) = 0; |
+ virtual void AddResourceToDirectory( |
+ const GURL& parent_content_url, |
+ const GURL& resource_url, |
+ const gdata::EntryActionCallback& callback) = 0; |
// Removes a resource (document, file, collection) identified by its |
// 'self' link |resource_url| from a collection with a content link |
@@ -189,7 +192,7 @@ class DriveServiceInterface { |
const GURL& parent_content_url, |
const GURL& resource_url, |
const std::string& resource_id, |
- const EntryActionCallback& callback) = 0; |
+ const gdata::EntryActionCallback& callback) = 0; |
// Creates new collection with |directory_name| under parent directory |
// identified with |parent_content_url|. If |parent_content_url| is empty, |
@@ -197,7 +200,7 @@ class DriveServiceInterface { |
// invokes |callback| and passes newly created entry on the calling thread. |
virtual void CreateDirectory(const GURL& parent_content_url, |
const FilePath::StringType& directory_name, |
- const GetDataCallback& callback) = 0; |
+ const gdata::GetDataCallback& callback) = 0; |
// Downloads a file identified by its |content_url|. The downloaded file will |
// be stored at |local_cache_path| location. Upon completion, invokes |
@@ -209,24 +212,25 @@ class DriveServiceInterface { |
const FilePath& virtual_path, |
const FilePath& local_cache_path, |
const GURL& content_url, |
- const DownloadActionCallback& download_action_callback, |
- const GetContentCallback& get_content_callback) = 0; |
+ const gdata::DownloadActionCallback& download_action_callback, |
+ const gdata::GetContentCallback& get_content_callback) = 0; |
// Initiates uploading of a document/file. |
- virtual void InitiateUpload(const InitiateUploadParams& params, |
- const InitiateUploadCallback& callback) = 0; |
+ virtual void InitiateUpload( |
+ const gdata::InitiateUploadParams& params, |
+ const gdata::InitiateUploadCallback& callback) = 0; |
// Resumes uploading of a document/file on the calling thread. |
- virtual void ResumeUpload(const ResumeUploadParams& params, |
- const ResumeUploadCallback& callback) = 0; |
+ virtual void ResumeUpload(const gdata::ResumeUploadParams& params, |
+ const gdata::ResumeUploadCallback& callback) = 0; |
// Authorizes a Drive app with the id |app_id| to open the given document. |
// Upon completion, invokes |callback| with results on the calling thread. |
virtual void AuthorizeApp(const GURL& resource_url, |
const std::string& app_id, |
- const GetDataCallback& callback) = 0; |
+ const gdata::GetDataCallback& callback) = 0; |
}; |
-} // namespace gdata |
+} // namespace drive |
#endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |