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

Side by Side Diff: chrome/browser/google_apis/drive_service_interface.h

Issue 12342008: Add GetAboutResource to DriveServiceInterface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sort class forward declaration. Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 // TODO(kochi): Further split gdata_operations.h and include only necessary 10 // TODO(kochi): Further split gdata_operations.h and include only necessary
11 // headers. http://crbug.com/141469 11 // headers. http://crbug.com/141469
12 // DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams 12 // DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams
13 #include "chrome/browser/google_apis/base_operations.h" 13 #include "chrome/browser/google_apis/base_operations.h"
14 #include "chrome/browser/google_apis/gdata_wapi_operations.h" 14 #include "chrome/browser/google_apis/gdata_wapi_operations.h"
15 15
16 class Profile; 16 class Profile;
17 17
18 namespace google_apis { 18 namespace google_apis {
19 19
20 class AboutResource;
21 class AccountMetadataFeed;
20 class AppList; 22 class AppList;
21 class AccountMetadataFeed; 23 class OperationRegistry;
22 class ResourceList; 24 class ResourceList;
23 class OperationRegistry;
24 25
25 // Observer interface for DriveServiceInterface. 26 // Observer interface for DriveServiceInterface.
26 class DriveServiceObserver { 27 class DriveServiceObserver {
27 public: 28 public:
28 // Triggered when the service gets ready to perform operations. 29 // Triggered when the service gets ready to perform operations.
29 virtual void OnReadyToPerformOperations() {} 30 virtual void OnReadyToPerformOperations() {}
30 31
31 // Called when an operation started, made some progress, or finished. 32 // Called when an operation started, made some progress, or finished.
32 virtual void OnProgressUpdate(const OperationProgressStatusList& list) {} 33 virtual void OnProgressUpdate(const OperationProgressStatusList& list) {}
33 34
(...skipping 12 matching lines...) Expand all
46 // Callback used for GetResourceEntry(). 47 // Callback used for GetResourceEntry().
47 typedef base::Callback<void(GDataErrorCode error, 48 typedef base::Callback<void(GDataErrorCode error,
48 scoped_ptr<ResourceEntry> entry)> 49 scoped_ptr<ResourceEntry> entry)>
49 GetResourceEntryCallback; 50 GetResourceEntryCallback;
50 51
51 // Callback used for GetAccountMetadata(). 52 // Callback used for GetAccountMetadata().
52 typedef base::Callback<void(GDataErrorCode error, 53 typedef base::Callback<void(GDataErrorCode error,
53 scoped_ptr<AccountMetadataFeed> account_metadata)> 54 scoped_ptr<AccountMetadataFeed> account_metadata)>
54 GetAccountMetadataCallback; 55 GetAccountMetadataCallback;
55 56
57 // Callback used for GetAboutResource().
58 typedef base::Callback<void(GDataErrorCode error,
59 scoped_ptr<AboutResource> about_resource)>
60 GetAboutResourceCallback;
61
56 // Callback used for GetApplicationInfo(). 62 // Callback used for GetApplicationInfo().
57 typedef base::Callback<void(GDataErrorCode erro, 63 typedef base::Callback<void(GDataErrorCode error,
58 scoped_ptr<AppList> app_list)> 64 scoped_ptr<AppList> app_list)>
59 GetAppListCallback; 65 GetAppListCallback;
60 66
61 // Callback used for AuthorizeApp(). |open_url| is used to open the target 67 // Callback used for AuthorizeApp(). |open_url| is used to open the target
62 // file with the authorized app. 68 // file with the authorized app.
63 typedef base::Callback<void(GDataErrorCode error, 69 typedef base::Callback<void(GDataErrorCode error,
64 const GURL& open_url)> 70 const GURL& open_url)>
65 AuthorizeAppCallback; 71 AuthorizeAppCallback;
66 72
67 // This defines an interface for sharing by DriveService and MockDriveService 73 // This defines an interface for sharing by DriveService and MockDriveService
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 virtual void GetResourceEntry(const std::string& resource_id, 153 virtual void GetResourceEntry(const std::string& resource_id,
148 const GetResourceEntryCallback& callback) = 0; 154 const GetResourceEntryCallback& callback) = 0;
149 155
150 // Gets the account metadata from the server using the default account 156 // Gets the account metadata from the server using the default account
151 // metadata URL. Upon completion, invokes |callback| with results on the 157 // metadata URL. Upon completion, invokes |callback| with results on the
152 // calling thread. 158 // calling thread.
153 // |callback| must not be null. 159 // |callback| must not be null.
154 virtual void GetAccountMetadata( 160 virtual void GetAccountMetadata(
155 const GetAccountMetadataCallback& callback) = 0; 161 const GetAccountMetadataCallback& callback) = 0;
156 162
163 // Gets the about resource information from the server.
164 // Upon completion, invokes |callback| with results on the calling thread.
165 // |callback| must not be null.
166 virtual void GetAboutResource(const GetAboutResourceCallback& callback) = 0;
167
157 // Gets the application information from the server. 168 // Gets the application information from the server.
158 // Upon completion, invokes |callback| with results on the calling thread. 169 // Upon completion, invokes |callback| with results on the calling thread.
159 // |callback| must not be null. 170 // |callback| must not be null.
160 virtual void GetAppList(const GetAppListCallback& callback) = 0; 171 virtual void GetAppList(const GetAppListCallback& callback) = 0;
161 172
162 // Deletes a resource identified by its |resource_id|. 173 // Deletes a resource identified by its |resource_id|.
163 // If |etag| is not empty and did not match, the deletion fails with 174 // If |etag| is not empty and did not match, the deletion fails with
164 // HTTP_PRECONDITION error. 175 // HTTP_PRECONDITION error.
165 // Upon completion, invokes |callback| with results on the calling thread. 176 // Upon completion, invokes |callback| with results on the calling thread.
166 // |callback| must not be null. 177 // |callback| must not be null.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Upon completion, invokes |callback| with the link to open the file with 287 // Upon completion, invokes |callback| with the link to open the file with
277 // the provided app. |callback| must not be null. 288 // the provided app. |callback| must not be null.
278 virtual void AuthorizeApp(const GURL& edit_url, 289 virtual void AuthorizeApp(const GURL& edit_url,
279 const std::string& app_id, 290 const std::string& app_id,
280 const AuthorizeAppCallback& callback) = 0; 291 const AuthorizeAppCallback& callback) = 0;
281 }; 292 };
282 293
283 } // namespace google_apis 294 } // namespace google_apis
284 295
285 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ 296 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/dummy_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698