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

Unified Diff: chrome/browser/sync_file_system/drive_backend/drive_service_messenger.cc

Issue 248853002: [NOCOMMIT] Make DriveService{Wrapper|Messenger} class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/drive_backend/drive_service_messenger.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_service_messenger.cc b/chrome/browser/sync_file_system/drive_backend/drive_service_messenger.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bc64be782cb1fbb3511afb74975ed4c653ffec2b
--- /dev/null
+++ b/chrome/browser/sync_file_system/drive_backend/drive_service_messenger.cc
@@ -0,0 +1,251 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/sync_file_system/drive_backend/drive_service_messenger.h"
+
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h"
+
+namespace sync_file_system {
+namespace drive_backend {
+
+DriveServiceMessenger::DriveServiceMessenger(
+ const base::WeakPtr<DriveServiceWrapper>& wrapper)
+ : wrapper_(wrapper) {}
+
+DriveServiceMessenger::~DriveServiceMessenger() {}
+
+void DriveServiceMessenger::Initialize(const std::string& account_id) {}
+
+void DriveServiceMessenger::AddObserver(drive::DriveServiceObserver* observer) {}
+
+void DriveServiceMessenger::RemoveObserver(
+ drive::DriveServiceObserver* observer) {}
+
+bool DriveServiceMessenger::CanSendRequest() const {
+ return true;
+}
+
+drive::ResourceIdCanonicalizer
+DriveServiceMessenger::GetResourceIdCanonicalizer() const {
+ return drive::ResourceIdCanonicalizer();
+}
+
+bool DriveServiceMessenger::HasAccessToken() const {
+ return true;
+}
+
+void DriveServiceMessenger::RequestAccessToken(
+ const google_apis::AuthStatusCallback& callback) {
+}
+
+bool DriveServiceMessenger::HasRefreshToken() const {
+ return true;
+}
+
+void DriveServiceMessenger::ClearAccessToken() {}
+
+void DriveServiceMessenger::ClearRefreshToken() {}
+
+std::string DriveServiceMessenger::GetRootResourceId() const { return ""; }
+
+google_apis::CancelCallback DriveServiceMessenger::GetAllResourceList(
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetResourceListInDirectory(
+ const std::string& directory_resource_id,
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::Search(
+ const std::string& search_query,
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::SearchByTitle(
+ const std::string& title,
+ const std::string& directory_resource_id,
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetChangeList(
+ int64 start_changestamp,
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetRemainingChangeList(
+ const GURL& next_link,
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetRemainingFileList(
+ const GURL& next_link,
+ const google_apis::GetResourceListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetResourceEntry(
+ const std::string& resource_id,
+ const google_apis::GetResourceEntryCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetShareUrl(
+ const std::string& resource_id,
+ const GURL& embed_origin,
+ const google_apis::GetShareUrlCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetAboutResource(
+ const google_apis::AboutResourceCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetAppList(
+ const google_apis::AppListCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::DeleteResource(
+ const std::string& resource_id,
+ const std::string& etag,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::TrashResource(
+ const std::string& resource_id,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::CopyResource(
+ const std::string& resource_id,
+ const std::string& parent_resource_id,
+ const std::string& new_title,
+ const base::Time& last_modified,
+ const google_apis::GetResourceEntryCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::UpdateResource(
+ const std::string& resource_id,
+ const std::string& parent_resource_id,
+ const std::string& new_title,
+ const base::Time& last_modified,
+ const base::Time& last_viewed_by_me,
+ const google_apis::GetResourceEntryCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::RenameResource(
+ const std::string& resource_id,
+ const std::string& new_title,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::AddResourceToDirectory(
+ const std::string& parent_resource_id,
+ const std::string& resource_id,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::RemoveResourceFromDirectory(
+ const std::string& parent_resource_id,
+ const std::string& resource_id,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::AddNewDirectory(
+ const std::string& parent_resource_id,
+ const std::string& directory_title,
+ const AddNewDirectoryOptions& options,
+ const google_apis::GetResourceEntryCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::DownloadFile(
+ const base::FilePath& local_cache_path,
+ const std::string& resource_id,
+ const google_apis::DownloadActionCallback& download_action_callback,
+ const google_apis::GetContentCallback& get_content_callback,
+ const google_apis::ProgressCallback& progress_callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::InitiateUploadNewFile(
+ const std::string& content_type,
+ int64 content_length,
+ const std::string& parent_resource_id,
+ const std::string& title,
+ const InitiateUploadNewFileOptions& options,
+ const google_apis::InitiateUploadCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::InitiateUploadExistingFile(
+ const std::string& content_type,
+ int64 content_length,
+ const std::string& resource_id,
+ const InitiateUploadExistingFileOptions& options,
+ const google_apis::InitiateUploadCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::ResumeUpload(
+ const GURL& upload_url,
+ int64 start_position,
+ int64 end_position,
+ int64 content_length,
+ const std::string& content_type,
+ const base::FilePath& local_file_path,
+ const google_apis::UploadRangeCallback& callback,
+ const google_apis::ProgressCallback& progress_callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::GetUploadStatus(
+ const GURL& upload_url,
+ int64 content_length,
+ const google_apis::UploadRangeCallback& callback) {
+ return google_apis::CancelCallback();
+}
+google_apis::CancelCallback DriveServiceMessenger::AuthorizeApp(
+ const std::string& resource_id,
+ const std::string& app_id,
+ const google_apis::AuthorizeAppCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::UninstallApp(
+ const std::string& app_id,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+google_apis::CancelCallback DriveServiceMessenger::AddPermission(
+ const std::string& resource_id,
+ const std::string& email,
+ google_apis::drive::PermissionRole role,
+ const google_apis::EntryActionCallback& callback) {
+ return google_apis::CancelCallback();
+}
+
+drive::DriveServiceInterface* DriveServiceMessenger::GetDriveService() {
+ return wrapper_->GetDriveService();
+}
+
+} // namespace drive_backend
+} // namespace sync_file_system

Powered by Google App Engine
This is Rietveld 408576698