OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" |
13 #include "chrome/browser/drive/drive_service_interface.h" | 13 #include "chrome/browser/drive/drive_service_interface.h" |
14 #include "chrome/browser/sync_file_system/drive_backend_v1/api_util_interface.h" | 14 #include "chrome/browser/sync_file_system/drive_backend_v1/api_util_interface.h" |
15 #include "net/base/network_change_notifier.h" | 15 #include "net/base/network_change_notifier.h" |
16 #include "webkit/common/blob/scoped_file.h" | 16 #include "webkit/common/blob/scoped_file.h" |
17 | 17 |
18 class GURL; | 18 class GURL; |
19 class Profile; | 19 class Profile; |
20 class ProfileOAuth2TokenService; | 20 class ProfileOAuth2TokenService; |
| 21 class SigninManagerBase; |
21 | 22 |
22 namespace drive { class DriveUploaderInterface; } | 23 namespace drive { class DriveUploaderInterface; } |
23 | 24 |
24 namespace sync_file_system { | 25 namespace sync_file_system { |
25 namespace drive_backend { | 26 namespace drive_backend { |
26 | 27 |
27 // This class is responsible for talking to the Drive service to get and put | 28 // This class is responsible for talking to the Drive service to get and put |
28 // Drive directories, files and metadata. | 29 // Drive directories, files and metadata. |
29 // This class is owned by DriveFileSyncService. | 30 // This class is owned by DriveFileSyncService. |
30 class APIUtil : public APIUtilInterface, | 31 class APIUtil : public APIUtilInterface, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 UploadKey RegisterUploadCallback(const UploadFileCallback& callback); | 236 UploadKey RegisterUploadCallback(const UploadFileCallback& callback); |
236 UploadFileCallback GetAndUnregisterUploadCallback(UploadKey key); | 237 UploadFileCallback GetAndUnregisterUploadCallback(UploadKey key); |
237 void CancelAllUploads(google_apis::GDataErrorCode error); | 238 void CancelAllUploads(google_apis::GDataErrorCode error); |
238 | 239 |
239 std::string GetRootResourceId() const; | 240 std::string GetRootResourceId() const; |
240 | 241 |
241 scoped_ptr<drive::DriveServiceInterface> drive_service_; | 242 scoped_ptr<drive::DriveServiceInterface> drive_service_; |
242 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; | 243 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; |
243 | 244 |
244 ProfileOAuth2TokenService* oauth_service_; | 245 ProfileOAuth2TokenService* oauth_service_; |
| 246 SigninManagerBase* signin_manager_; |
245 | 247 |
246 UploadCallbackMap upload_callback_map_; | 248 UploadCallbackMap upload_callback_map_; |
247 UploadKey upload_next_key_; | 249 UploadKey upload_next_key_; |
248 | 250 |
249 base::FilePath temp_dir_path_; | 251 base::FilePath temp_dir_path_; |
250 | 252 |
251 std::string root_resource_id_; | 253 std::string root_resource_id_; |
252 | 254 |
253 bool has_initialized_token_; | 255 bool has_initialized_token_; |
254 | 256 |
255 ObserverList<APIUtilObserver> observers_; | 257 ObserverList<APIUtilObserver> observers_; |
256 | 258 |
257 DISALLOW_COPY_AND_ASSIGN(APIUtil); | 259 DISALLOW_COPY_AND_ASSIGN(APIUtil); |
258 }; | 260 }; |
259 | 261 |
260 } // namespace drive_backend | 262 } // namespace drive_backend |
261 } // namespace sync_file_system | 263 } // namespace sync_file_system |
262 | 264 |
263 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ | 265 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ |
OLD | NEW |