OLD | NEW |
(Empty) | |
| 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_service_messenger.
h" |
| 6 |
| 7 #include "base/memory/weak_ptr.h" |
| 8 #include "chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h" |
| 9 |
| 10 namespace sync_file_system { |
| 11 namespace drive_backend { |
| 12 |
| 13 DriveServiceMessenger::DriveServiceMessenger( |
| 14 const base::WeakPtr<DriveServiceWrapper>& wrapper) |
| 15 : wrapper_(wrapper) {} |
| 16 |
| 17 DriveServiceMessenger::~DriveServiceMessenger() {} |
| 18 |
| 19 void DriveServiceMessenger::Initialize(const std::string& account_id) {} |
| 20 |
| 21 void DriveServiceMessenger::AddObserver(drive::DriveServiceObserver* observer) {
} |
| 22 |
| 23 void DriveServiceMessenger::RemoveObserver( |
| 24 drive::DriveServiceObserver* observer) {} |
| 25 |
| 26 bool DriveServiceMessenger::CanSendRequest() const { |
| 27 return true; |
| 28 } |
| 29 |
| 30 drive::ResourceIdCanonicalizer |
| 31 DriveServiceMessenger::GetResourceIdCanonicalizer() const { |
| 32 return drive::ResourceIdCanonicalizer(); |
| 33 } |
| 34 |
| 35 bool DriveServiceMessenger::HasAccessToken() const { |
| 36 return true; |
| 37 } |
| 38 |
| 39 void DriveServiceMessenger::RequestAccessToken( |
| 40 const google_apis::AuthStatusCallback& callback) { |
| 41 } |
| 42 |
| 43 bool DriveServiceMessenger::HasRefreshToken() const { |
| 44 return true; |
| 45 } |
| 46 |
| 47 void DriveServiceMessenger::ClearAccessToken() {} |
| 48 |
| 49 void DriveServiceMessenger::ClearRefreshToken() {} |
| 50 |
| 51 std::string DriveServiceMessenger::GetRootResourceId() const { return ""; } |
| 52 |
| 53 google_apis::CancelCallback DriveServiceMessenger::GetAllResourceList( |
| 54 const google_apis::GetResourceListCallback& callback) { |
| 55 return google_apis::CancelCallback(); |
| 56 } |
| 57 |
| 58 google_apis::CancelCallback DriveServiceMessenger::GetResourceListInDirectory( |
| 59 const std::string& directory_resource_id, |
| 60 const google_apis::GetResourceListCallback& callback) { |
| 61 return google_apis::CancelCallback(); |
| 62 } |
| 63 |
| 64 google_apis::CancelCallback DriveServiceMessenger::Search( |
| 65 const std::string& search_query, |
| 66 const google_apis::GetResourceListCallback& callback) { |
| 67 return google_apis::CancelCallback(); |
| 68 } |
| 69 |
| 70 google_apis::CancelCallback DriveServiceMessenger::SearchByTitle( |
| 71 const std::string& title, |
| 72 const std::string& directory_resource_id, |
| 73 const google_apis::GetResourceListCallback& callback) { |
| 74 return google_apis::CancelCallback(); |
| 75 } |
| 76 |
| 77 google_apis::CancelCallback DriveServiceMessenger::GetChangeList( |
| 78 int64 start_changestamp, |
| 79 const google_apis::GetResourceListCallback& callback) { |
| 80 return google_apis::CancelCallback(); |
| 81 } |
| 82 |
| 83 google_apis::CancelCallback DriveServiceMessenger::GetRemainingChangeList( |
| 84 const GURL& next_link, |
| 85 const google_apis::GetResourceListCallback& callback) { |
| 86 return google_apis::CancelCallback(); |
| 87 } |
| 88 |
| 89 google_apis::CancelCallback DriveServiceMessenger::GetRemainingFileList( |
| 90 const GURL& next_link, |
| 91 const google_apis::GetResourceListCallback& callback) { |
| 92 return google_apis::CancelCallback(); |
| 93 } |
| 94 |
| 95 google_apis::CancelCallback DriveServiceMessenger::GetResourceEntry( |
| 96 const std::string& resource_id, |
| 97 const google_apis::GetResourceEntryCallback& callback) { |
| 98 return google_apis::CancelCallback(); |
| 99 } |
| 100 |
| 101 google_apis::CancelCallback DriveServiceMessenger::GetShareUrl( |
| 102 const std::string& resource_id, |
| 103 const GURL& embed_origin, |
| 104 const google_apis::GetShareUrlCallback& callback) { |
| 105 return google_apis::CancelCallback(); |
| 106 } |
| 107 |
| 108 google_apis::CancelCallback DriveServiceMessenger::GetAboutResource( |
| 109 const google_apis::AboutResourceCallback& callback) { |
| 110 return google_apis::CancelCallback(); |
| 111 } |
| 112 |
| 113 google_apis::CancelCallback DriveServiceMessenger::GetAppList( |
| 114 const google_apis::AppListCallback& callback) { |
| 115 return google_apis::CancelCallback(); |
| 116 } |
| 117 |
| 118 google_apis::CancelCallback DriveServiceMessenger::DeleteResource( |
| 119 const std::string& resource_id, |
| 120 const std::string& etag, |
| 121 const google_apis::EntryActionCallback& callback) { |
| 122 return google_apis::CancelCallback(); |
| 123 } |
| 124 |
| 125 google_apis::CancelCallback DriveServiceMessenger::TrashResource( |
| 126 const std::string& resource_id, |
| 127 const google_apis::EntryActionCallback& callback) { |
| 128 return google_apis::CancelCallback(); |
| 129 } |
| 130 |
| 131 google_apis::CancelCallback DriveServiceMessenger::CopyResource( |
| 132 const std::string& resource_id, |
| 133 const std::string& parent_resource_id, |
| 134 const std::string& new_title, |
| 135 const base::Time& last_modified, |
| 136 const google_apis::GetResourceEntryCallback& callback) { |
| 137 return google_apis::CancelCallback(); |
| 138 } |
| 139 |
| 140 google_apis::CancelCallback DriveServiceMessenger::UpdateResource( |
| 141 const std::string& resource_id, |
| 142 const std::string& parent_resource_id, |
| 143 const std::string& new_title, |
| 144 const base::Time& last_modified, |
| 145 const base::Time& last_viewed_by_me, |
| 146 const google_apis::GetResourceEntryCallback& callback) { |
| 147 return google_apis::CancelCallback(); |
| 148 } |
| 149 |
| 150 google_apis::CancelCallback DriveServiceMessenger::RenameResource( |
| 151 const std::string& resource_id, |
| 152 const std::string& new_title, |
| 153 const google_apis::EntryActionCallback& callback) { |
| 154 return google_apis::CancelCallback(); |
| 155 } |
| 156 |
| 157 google_apis::CancelCallback DriveServiceMessenger::AddResourceToDirectory( |
| 158 const std::string& parent_resource_id, |
| 159 const std::string& resource_id, |
| 160 const google_apis::EntryActionCallback& callback) { |
| 161 return google_apis::CancelCallback(); |
| 162 } |
| 163 |
| 164 google_apis::CancelCallback DriveServiceMessenger::RemoveResourceFromDirectory( |
| 165 const std::string& parent_resource_id, |
| 166 const std::string& resource_id, |
| 167 const google_apis::EntryActionCallback& callback) { |
| 168 return google_apis::CancelCallback(); |
| 169 } |
| 170 |
| 171 google_apis::CancelCallback DriveServiceMessenger::AddNewDirectory( |
| 172 const std::string& parent_resource_id, |
| 173 const std::string& directory_title, |
| 174 const AddNewDirectoryOptions& options, |
| 175 const google_apis::GetResourceEntryCallback& callback) { |
| 176 return google_apis::CancelCallback(); |
| 177 } |
| 178 |
| 179 google_apis::CancelCallback DriveServiceMessenger::DownloadFile( |
| 180 const base::FilePath& local_cache_path, |
| 181 const std::string& resource_id, |
| 182 const google_apis::DownloadActionCallback& download_action_callback, |
| 183 const google_apis::GetContentCallback& get_content_callback, |
| 184 const google_apis::ProgressCallback& progress_callback) { |
| 185 return google_apis::CancelCallback(); |
| 186 } |
| 187 |
| 188 google_apis::CancelCallback DriveServiceMessenger::InitiateUploadNewFile( |
| 189 const std::string& content_type, |
| 190 int64 content_length, |
| 191 const std::string& parent_resource_id, |
| 192 const std::string& title, |
| 193 const InitiateUploadNewFileOptions& options, |
| 194 const google_apis::InitiateUploadCallback& callback) { |
| 195 return google_apis::CancelCallback(); |
| 196 } |
| 197 |
| 198 google_apis::CancelCallback DriveServiceMessenger::InitiateUploadExistingFile( |
| 199 const std::string& content_type, |
| 200 int64 content_length, |
| 201 const std::string& resource_id, |
| 202 const InitiateUploadExistingFileOptions& options, |
| 203 const google_apis::InitiateUploadCallback& callback) { |
| 204 return google_apis::CancelCallback(); |
| 205 } |
| 206 |
| 207 google_apis::CancelCallback DriveServiceMessenger::ResumeUpload( |
| 208 const GURL& upload_url, |
| 209 int64 start_position, |
| 210 int64 end_position, |
| 211 int64 content_length, |
| 212 const std::string& content_type, |
| 213 const base::FilePath& local_file_path, |
| 214 const google_apis::UploadRangeCallback& callback, |
| 215 const google_apis::ProgressCallback& progress_callback) { |
| 216 return google_apis::CancelCallback(); |
| 217 } |
| 218 |
| 219 google_apis::CancelCallback DriveServiceMessenger::GetUploadStatus( |
| 220 const GURL& upload_url, |
| 221 int64 content_length, |
| 222 const google_apis::UploadRangeCallback& callback) { |
| 223 return google_apis::CancelCallback(); |
| 224 } |
| 225 google_apis::CancelCallback DriveServiceMessenger::AuthorizeApp( |
| 226 const std::string& resource_id, |
| 227 const std::string& app_id, |
| 228 const google_apis::AuthorizeAppCallback& callback) { |
| 229 return google_apis::CancelCallback(); |
| 230 } |
| 231 |
| 232 google_apis::CancelCallback DriveServiceMessenger::UninstallApp( |
| 233 const std::string& app_id, |
| 234 const google_apis::EntryActionCallback& callback) { |
| 235 return google_apis::CancelCallback(); |
| 236 } |
| 237 |
| 238 google_apis::CancelCallback DriveServiceMessenger::AddPermission( |
| 239 const std::string& resource_id, |
| 240 const std::string& email, |
| 241 google_apis::drive::PermissionRole role, |
| 242 const google_apis::EntryActionCallback& callback) { |
| 243 return google_apis::CancelCallback(); |
| 244 } |
| 245 |
| 246 drive::DriveServiceInterface* DriveServiceMessenger::GetDriveService() { |
| 247 return wrapper_->GetDriveService(); |
| 248 } |
| 249 |
| 250 } // namespace drive_backend |
| 251 } // namespace sync_file_system |
OLD | NEW |