| OLD | NEW |
| 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 #include "chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chrome/browser/drive/drive_service_interface.h" | 10 #include "chrome/browser/drive/drive_service_interface.h" |
| 11 | 11 |
| 12 namespace sync_file_system { | 12 namespace sync_file_system { |
| 13 namespace drive_backend { | 13 namespace drive_backend { |
| 14 | 14 |
| 15 DriveServiceWrapper::DriveServiceWrapper( | 15 DriveServiceWrapper::DriveServiceWrapper( |
| 16 drive::DriveServiceInterface* drive_service) | 16 drive::DriveServiceInterface* drive_service) |
| 17 : drive_service_(drive_service) { | 17 : drive_service_(drive_service) { |
| 18 DCHECK(drive_service_); | 18 DCHECK(drive_service_); |
| 19 } | 19 } |
| 20 | 20 |
| 21 void DriveServiceWrapper::AddNewDirectory( | 21 void DriveServiceWrapper::AddNewDirectory( |
| 22 const std::string& parent_resource_id, | 22 const std::string& parent_resource_id, |
| 23 const std::string& directory_title, | 23 const std::string& directory_title, |
| 24 const drive::DriveServiceInterface::AddNewDirectoryOptions& options, | 24 const drive::AddNewDirectoryOptions& options, |
| 25 const google_apis::FileResourceCallback& callback) { | 25 const google_apis::FileResourceCallback& callback) { |
| 26 DCHECK(sequece_checker_.CalledOnValidSequencedThread()); | 26 DCHECK(sequece_checker_.CalledOnValidSequencedThread()); |
| 27 drive_service_->AddNewDirectory(parent_resource_id, | 27 drive_service_->AddNewDirectory(parent_resource_id, |
| 28 directory_title, | 28 directory_title, |
| 29 options, | 29 options, |
| 30 callback); | 30 callback); |
| 31 } | 31 } |
| 32 | 32 |
| 33 void DriveServiceWrapper::DeleteResource( | 33 void DriveServiceWrapper::DeleteResource( |
| 34 const std::string& resource_id, | 34 const std::string& resource_id, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const std::string& title, | 108 const std::string& title, |
| 109 const std::string& directory_resource_id, | 109 const std::string& directory_resource_id, |
| 110 const google_apis::FileListCallback& callback) { | 110 const google_apis::FileListCallback& callback) { |
| 111 DCHECK(sequece_checker_.CalledOnValidSequencedThread()); | 111 DCHECK(sequece_checker_.CalledOnValidSequencedThread()); |
| 112 drive_service_->SearchByTitle( | 112 drive_service_->SearchByTitle( |
| 113 title, directory_resource_id, callback); | 113 title, directory_resource_id, callback); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace drive_backend | 116 } // namespace drive_backend |
| 117 } // namespace sync_file_system | 117 } // namespace sync_file_system |
| OLD | NEW |