Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / drive / dummy_drive_service.h
1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_DRIVE_DUMMY_DRIVE_SERVICE_H_
6 #define CHROME_BROWSER_DRIVE_DUMMY_DRIVE_SERVICE_H_
7
8 #include "chrome/browser/drive/drive_service_interface.h"
9 #include "google_apis/drive/auth_service_interface.h"
10
11 namespace drive {
12
13 // Dummy implementation of DriveServiceInterface.
14 // All functions do nothing, or return place holder values like 'true'.
15 class DummyDriveService : public DriveServiceInterface {
16  public:
17   DummyDriveService();
18   ~DummyDriveService() override;
19
20   // DriveServiceInterface Overrides
21   void Initialize(const std::string& account_id) override;
22   void AddObserver(DriveServiceObserver* observer) override;
23   void RemoveObserver(DriveServiceObserver* observer) override;
24   bool CanSendRequest() const override;
25   bool HasAccessToken() const override;
26   void RequestAccessToken(
27       const google_apis::AuthStatusCallback& callback) override;
28   bool HasRefreshToken() const override;
29   void ClearAccessToken() override;
30   void ClearRefreshToken() override;
31   std::string GetRootResourceId() const override;
32   google_apis::CancelCallback GetAllFileList(
33       const google_apis::FileListCallback& callback) override;
34   google_apis::CancelCallback GetFileListInDirectory(
35       const std::string& directory_resource_id,
36       const google_apis::FileListCallback& callback) override;
37   google_apis::CancelCallback Search(
38       const std::string& search_query,
39       const google_apis::FileListCallback& callback) override;
40   google_apis::CancelCallback SearchByTitle(
41       const std::string& title,
42       const std::string& directory_resource_id,
43       const google_apis::FileListCallback& callback) override;
44   google_apis::CancelCallback GetChangeList(
45       int64 start_changestamp,
46       const google_apis::ChangeListCallback& callback) override;
47   google_apis::CancelCallback GetRemainingChangeList(
48       const GURL& next_link,
49       const google_apis::ChangeListCallback& callback) override;
50   google_apis::CancelCallback GetRemainingFileList(
51       const GURL& next_link,
52       const google_apis::FileListCallback& callback) override;
53   google_apis::CancelCallback GetFileResource(
54       const std::string& resource_id,
55       const google_apis::FileResourceCallback& callback) override;
56   google_apis::CancelCallback GetShareUrl(
57       const std::string& resource_id,
58       const GURL& embed_origin,
59       const google_apis::GetShareUrlCallback& callback) override;
60   google_apis::CancelCallback GetAboutResource(
61       const google_apis::AboutResourceCallback& callback) override;
62   google_apis::CancelCallback GetAppList(
63       const google_apis::AppListCallback& callback) override;
64   google_apis::CancelCallback DeleteResource(
65       const std::string& resource_id,
66       const std::string& etag,
67       const google_apis::EntryActionCallback& callback) override;
68   google_apis::CancelCallback TrashResource(
69       const std::string& resource_id,
70       const google_apis::EntryActionCallback& callback) override;
71   google_apis::CancelCallback DownloadFile(
72       const base::FilePath& local_cache_path,
73       const std::string& resource_id,
74       const google_apis::DownloadActionCallback& download_action_callback,
75       const google_apis::GetContentCallback& get_content_callback,
76       const google_apis::ProgressCallback& progress_callback) override;
77   google_apis::CancelCallback CopyResource(
78       const std::string& resource_id,
79       const std::string& parent_resource_id,
80       const std::string& new_title,
81       const base::Time& last_modified,
82       const google_apis::FileResourceCallback& callback) override;
83   google_apis::CancelCallback UpdateResource(
84       const std::string& resource_id,
85       const std::string& parent_resource_id,
86       const std::string& new_title,
87       const base::Time& last_modified,
88       const base::Time& last_viewed_by_me,
89       const google_apis::FileResourceCallback& callback) override;
90   google_apis::CancelCallback AddResourceToDirectory(
91       const std::string& parent_resource_id,
92       const std::string& resource_id,
93       const google_apis::EntryActionCallback& callback) override;
94   google_apis::CancelCallback RemoveResourceFromDirectory(
95       const std::string& parent_resource_id,
96       const std::string& resource_id,
97       const google_apis::EntryActionCallback& callback) override;
98   google_apis::CancelCallback AddNewDirectory(
99       const std::string& parent_resource_id,
100       const std::string& directory_title,
101       const AddNewDirectoryOptions& options,
102       const google_apis::FileResourceCallback& callback) override;
103   google_apis::CancelCallback InitiateUploadNewFile(
104       const std::string& content_type,
105       int64 content_length,
106       const std::string& parent_resource_id,
107       const std::string& title,
108       const InitiateUploadNewFileOptions& options,
109       const google_apis::InitiateUploadCallback& callback) override;
110   google_apis::CancelCallback InitiateUploadExistingFile(
111       const std::string& content_type,
112       int64 content_length,
113       const std::string& resource_id,
114       const InitiateUploadExistingFileOptions& options,
115       const google_apis::InitiateUploadCallback& callback) override;
116   google_apis::CancelCallback ResumeUpload(
117       const GURL& upload_url,
118       int64 start_position,
119       int64 end_position,
120       int64 content_length,
121       const std::string& content_type,
122       const base::FilePath& local_file_path,
123       const google_apis::drive::UploadRangeCallback& callback,
124       const google_apis::ProgressCallback& progress_callback) override;
125   google_apis::CancelCallback GetUploadStatus(
126       const GURL& upload_url,
127       int64 content_length,
128       const google_apis::drive::UploadRangeCallback& callback) override;
129   google_apis::CancelCallback AuthorizeApp(
130       const std::string& resource_id,
131       const std::string& app_id,
132       const google_apis::AuthorizeAppCallback& callback) override;
133   google_apis::CancelCallback UninstallApp(
134       const std::string& app_id,
135       const google_apis::EntryActionCallback& callback) override;
136   google_apis::CancelCallback AddPermission(
137       const std::string& resource_id,
138       const std::string& email,
139       google_apis::drive::PermissionRole role,
140       const google_apis::EntryActionCallback& callback) override;
141 };
142
143 }  // namespace drive
144
145 #endif  // CHROME_BROWSER_DRIVE_DUMMY_DRIVE_SERVICE_H_