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; | |
22 | 21 |
23 namespace drive { class DriveUploaderInterface; } | 22 namespace drive { class DriveUploaderInterface; } |
24 | 23 |
25 namespace sync_file_system { | 24 namespace sync_file_system { |
26 namespace drive_backend { | 25 namespace drive_backend { |
27 | 26 |
28 // This class is responsible for talking to the Drive service to get and put | 27 // This class is responsible for talking to the Drive service to get and put |
29 // Drive directories, files and metadata. | 28 // Drive directories, files and metadata. |
30 // This class is owned by DriveFileSyncService. | 29 // This class is owned by DriveFileSyncService. |
31 class APIUtil : public APIUtilInterface, | 30 class APIUtil : public APIUtilInterface, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 UploadKey RegisterUploadCallback(const UploadFileCallback& callback); | 235 UploadKey RegisterUploadCallback(const UploadFileCallback& callback); |
237 UploadFileCallback GetAndUnregisterUploadCallback(UploadKey key); | 236 UploadFileCallback GetAndUnregisterUploadCallback(UploadKey key); |
238 void CancelAllUploads(google_apis::GDataErrorCode error); | 237 void CancelAllUploads(google_apis::GDataErrorCode error); |
239 | 238 |
240 std::string GetRootResourceId() const; | 239 std::string GetRootResourceId() const; |
241 | 240 |
242 scoped_ptr<drive::DriveServiceInterface> drive_service_; | 241 scoped_ptr<drive::DriveServiceInterface> drive_service_; |
243 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; | 242 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; |
244 | 243 |
245 ProfileOAuth2TokenService* oauth_service_; | 244 ProfileOAuth2TokenService* oauth_service_; |
246 SigninManagerBase* signin_manager_; | |
247 | 245 |
248 UploadCallbackMap upload_callback_map_; | 246 UploadCallbackMap upload_callback_map_; |
249 UploadKey upload_next_key_; | 247 UploadKey upload_next_key_; |
250 | 248 |
251 base::FilePath temp_dir_path_; | 249 base::FilePath temp_dir_path_; |
252 | 250 |
253 std::string root_resource_id_; | 251 std::string root_resource_id_; |
254 | 252 |
255 bool has_initialized_token_; | 253 bool has_initialized_token_; |
256 | 254 |
257 ObserverList<APIUtilObserver> observers_; | 255 ObserverList<APIUtilObserver> observers_; |
258 | 256 |
259 DISALLOW_COPY_AND_ASSIGN(APIUtil); | 257 DISALLOW_COPY_AND_ASSIGN(APIUtil); |
260 }; | 258 }; |
261 | 259 |
262 } // namespace drive_backend | 260 } // namespace drive_backend |
263 } // namespace sync_file_system | 261 } // namespace sync_file_system |
264 | 262 |
265 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ | 263 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ |
OLD | NEW |