| 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 "storage/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 class SigninManagerBase; |
| 22 | 22 |
| 23 namespace drive { class DriveUploaderInterface; } | 23 namespace drive { class DriveUploaderInterface; } |
| 24 | 24 |
| 25 namespace sync_file_system { | 25 namespace sync_file_system { |
| 26 namespace drive_backend { | 26 namespace drive_backend { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 google_apis::GDataErrorCode error, | 166 google_apis::GDataErrorCode error, |
| 167 scoped_ptr<google_apis::ChangeList> change_list); | 167 scoped_ptr<google_apis::ChangeList> change_list); |
| 168 | 168 |
| 169 void DidGetFileResource(const ResourceEntryCallback& callback, | 169 void DidGetFileResource(const ResourceEntryCallback& callback, |
| 170 google_apis::GDataErrorCode error, | 170 google_apis::GDataErrorCode error, |
| 171 scoped_ptr<google_apis::FileResource> entry); | 171 scoped_ptr<google_apis::FileResource> entry); |
| 172 | 172 |
| 173 void DidGetTemporaryFileForDownload( | 173 void DidGetTemporaryFileForDownload( |
| 174 const std::string& resource_id, | 174 const std::string& resource_id, |
| 175 const std::string& local_file_md5, | 175 const std::string& local_file_md5, |
| 176 scoped_ptr<webkit_blob::ScopedFile> local_file, | 176 scoped_ptr<storage::ScopedFile> local_file, |
| 177 const DownloadFileCallback& callback, | 177 const DownloadFileCallback& callback, |
| 178 bool success); | 178 bool success); |
| 179 | 179 |
| 180 void DownloadFileInternal(const std::string& local_file_md5, | 180 void DownloadFileInternal(const std::string& local_file_md5, |
| 181 scoped_ptr<webkit_blob::ScopedFile> local_file, | 181 scoped_ptr<storage::ScopedFile> local_file, |
| 182 const DownloadFileCallback& callback, | 182 const DownloadFileCallback& callback, |
| 183 google_apis::GDataErrorCode error, | 183 google_apis::GDataErrorCode error, |
| 184 scoped_ptr<google_apis::ResourceEntry> entry); | 184 scoped_ptr<google_apis::ResourceEntry> entry); |
| 185 | 185 |
| 186 void DidDownloadFile(scoped_ptr<google_apis::ResourceEntry> entry, | 186 void DidDownloadFile(scoped_ptr<google_apis::ResourceEntry> entry, |
| 187 scoped_ptr<webkit_blob::ScopedFile> local_file, | 187 scoped_ptr<storage::ScopedFile> local_file, |
| 188 const DownloadFileCallback& callback, | 188 const DownloadFileCallback& callback, |
| 189 google_apis::GDataErrorCode error, | 189 google_apis::GDataErrorCode error, |
| 190 const base::FilePath& downloaded_file_path); | 190 const base::FilePath& downloaded_file_path); |
| 191 | 191 |
| 192 void DidUploadNewFile(const std::string& parent_resource_id, | 192 void DidUploadNewFile(const std::string& parent_resource_id, |
| 193 const std::string& title, | 193 const std::string& title, |
| 194 UploadKey upload_key, | 194 UploadKey upload_key, |
| 195 google_apis::GDataErrorCode error, | 195 google_apis::GDataErrorCode error, |
| 196 scoped_ptr<google_apis::ResourceEntry> entry); | 196 scoped_ptr<google_apis::ResourceEntry> entry); |
| 197 | 197 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 ObserverList<APIUtilObserver> observers_; | 261 ObserverList<APIUtilObserver> observers_; |
| 262 | 262 |
| 263 DISALLOW_COPY_AND_ASSIGN(APIUtil); | 263 DISALLOW_COPY_AND_ASSIGN(APIUtil); |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 } // namespace drive_backend | 266 } // namespace drive_backend |
| 267 } // namespace sync_file_system | 267 } // namespace sync_file_system |
| 268 | 268 |
| 269 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ | 269 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_API_UTIL_H_ |
| OLD | NEW |