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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_uploader_wrapper.h

Issue 1042803002: Drive: Move inner structures of DriveAPIService under drive namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DRIVE_UPLOADER_WRAPPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_UPLOADER_WRAPPER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_UPLOADER_WRAPPER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_UPLOADER_WRAPPER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/sequence_checker.h" 9 #include "base/sequence_checker.h"
10 #include "chrome/browser/drive/drive_uploader.h" 10 #include "chrome/browser/drive/drive_uploader.h"
11 11
12 namespace sync_file_system { 12 namespace sync_file_system {
13 namespace drive_backend { 13 namespace drive_backend {
14 14
15 // This class wraps a part of DriveUploaderInterface class to support weak 15 // This class wraps a part of DriveUploaderInterface class to support weak
16 // pointer. Each method wraps corresponding name method of 16 // pointer. Each method wraps corresponding name method of
17 // DriveUploaderInterface. See comments in drive_uploader_interface.h 17 // DriveUploaderInterface. See comments in drive_uploader_interface.h
18 // for details. 18 // for details.
19 class DriveUploaderWrapper 19 class DriveUploaderWrapper
20 : public base::SupportsWeakPtr<DriveUploaderWrapper> { 20 : public base::SupportsWeakPtr<DriveUploaderWrapper> {
21 public: 21 public:
22 explicit DriveUploaderWrapper(drive::DriveUploaderInterface* drive_uploader); 22 explicit DriveUploaderWrapper(drive::DriveUploaderInterface* drive_uploader);
23 23
24 void UploadExistingFile( 24 void UploadExistingFile(const std::string& resource_id,
25 const std::string& resource_id, 25 const base::FilePath& local_file_path,
26 const base::FilePath& local_file_path, 26 const std::string& content_type,
27 const std::string& content_type, 27 const drive::UploadExistingFileOptions& options,
28 const drive::DriveUploaderInterface::UploadExistingFileOptions& options, 28 const drive::UploadCompletionCallback& callback);
29 const drive::UploadCompletionCallback& callback);
30 29
31 void UploadNewFile( 30 void UploadNewFile(const std::string& parent_resource_id,
32 const std::string& parent_resource_id, 31 const base::FilePath& local_file_path,
33 const base::FilePath& local_file_path, 32 const std::string& title,
34 const std::string& title, 33 const std::string& content_type,
35 const std::string& content_type, 34 const drive::UploadNewFileOptions& options,
36 const drive::DriveUploaderInterface::UploadNewFileOptions& options, 35 const drive::UploadCompletionCallback& callback);
37 const drive::UploadCompletionCallback& callback);
38 36
39 private: 37 private:
40 drive::DriveUploaderInterface* drive_uploader_; 38 drive::DriveUploaderInterface* drive_uploader_;
41 base::SequenceChecker sequence_checker_; 39 base::SequenceChecker sequence_checker_;
42 40
43 DISALLOW_COPY_AND_ASSIGN(DriveUploaderWrapper); 41 DISALLOW_COPY_AND_ASSIGN(DriveUploaderWrapper);
44 }; 42 };
45 43
46 } // namespace drive_backend 44 } // namespace drive_backend
47 } // namespace sync_file_system 45 } // namespace sync_file_system
48 46
49 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_UPLOADER_WRAPPER_ H_ 47 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_UPLOADER_WRAPPER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698