OLD | NEW |
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_DRIVE_DRIVE_UPLOADER_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_UPLOADER_H_ |
6 #define CHROME_BROWSER_DRIVE_DRIVE_UPLOADER_H_ | 6 #define CHROME_BROWSER_DRIVE_DRIVE_UPLOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 const GURL& upload_location, | 107 const GURL& upload_location, |
108 const base::FilePath& local_file_path, | 108 const base::FilePath& local_file_path, |
109 const std::string& content_type, | 109 const std::string& content_type, |
110 const UploadCompletionCallback& callback, | 110 const UploadCompletionCallback& callback, |
111 const google_apis::ProgressCallback& progress_callback) = 0; | 111 const google_apis::ProgressCallback& progress_callback) = 0; |
112 }; | 112 }; |
113 | 113 |
114 class DriveUploader : public DriveUploaderInterface { | 114 class DriveUploader : public DriveUploaderInterface { |
115 public: | 115 public: |
116 DriveUploader(DriveServiceInterface* drive_service, | 116 DriveUploader(DriveServiceInterface* drive_service, |
117 base::TaskRunner* blocking_task_runner); | 117 const scoped_refptr<base::TaskRunner>& blocking_task_runner); |
118 virtual ~DriveUploader(); | 118 virtual ~DriveUploader(); |
119 | 119 |
120 // DriveUploaderInterface overrides. | 120 // DriveUploaderInterface overrides. |
121 virtual google_apis::CancelCallback UploadNewFile( | 121 virtual google_apis::CancelCallback UploadNewFile( |
122 const std::string& parent_resource_id, | 122 const std::string& parent_resource_id, |
123 const base::FilePath& local_file_path, | 123 const base::FilePath& local_file_path, |
124 const std::string& title, | 124 const std::string& title, |
125 const std::string& content_type, | 125 const std::string& content_type, |
126 const UploadNewFileOptions& options, | 126 const UploadNewFileOptions& options, |
127 const UploadCompletionCallback& callback, | 127 const UploadCompletionCallback& callback, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 // Note: This should remain the last member so it'll be destroyed and | 205 // Note: This should remain the last member so it'll be destroyed and |
206 // invalidate its weak pointers before any other members are destroyed. | 206 // invalidate its weak pointers before any other members are destroyed. |
207 base::WeakPtrFactory<DriveUploader> weak_ptr_factory_; | 207 base::WeakPtrFactory<DriveUploader> weak_ptr_factory_; |
208 DISALLOW_COPY_AND_ASSIGN(DriveUploader); | 208 DISALLOW_COPY_AND_ASSIGN(DriveUploader); |
209 }; | 209 }; |
210 | 210 |
211 } // namespace drive | 211 } // namespace drive |
212 | 212 |
213 #endif // CHROME_BROWSER_DRIVE_DRIVE_UPLOADER_H_ | 213 #endif // CHROME_BROWSER_DRIVE_DRIVE_UPLOADER_H_ |
OLD | NEW |