Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync_file_system / drive_backend / drive_uploader_wrapper.cc
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/sync_file_system/drive_backend/drive_uploader_wrapper.h"
6
7 #include "base/memory/weak_ptr.h"
8 #include "chrome/browser/drive/drive_uploader.h"
9
10 namespace sync_file_system {
11 namespace drive_backend {
12
13 DriveUploaderWrapper::DriveUploaderWrapper(
14     drive::DriveUploaderInterface* drive_uploader)
15     : drive_uploader_(drive_uploader) {}
16
17 void DriveUploaderWrapper::UploadExistingFile(
18     const std::string& resource_id,
19     const base::FilePath& local_file_path,
20     const std::string& content_type,
21     const drive::DriveUploaderInterface::UploadExistingFileOptions& options,
22     const drive::UploadCompletionCallback& callback) {
23   drive_uploader_->UploadExistingFile(
24       resource_id,
25       local_file_path,
26       content_type,
27       options,
28       callback,
29       google_apis::ProgressCallback());
30 }
31
32 void DriveUploaderWrapper::UploadNewFile(
33     const std::string& parent_resource_id,
34     const base::FilePath& local_file_path,
35     const std::string& title,
36     const std::string& content_type,
37     const drive::DriveUploaderInterface::UploadNewFileOptions& options,
38     const drive::UploadCompletionCallback& callback) {
39   drive_uploader_->UploadNewFile(
40       parent_resource_id,
41       local_file_path,
42       title,
43       content_type,
44       options,
45       callback,
46       google_apis::ProgressCallback());
47 }
48
49 }  // namespace drive_backend
50 }  // namespace sync_file_system