Upstream version 9.38.198.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   virtual ~DummyDriveService();
19
20   // DriveServiceInterface Overrides
21   virtual void Initialize(const std::string& account_id) OVERRIDE;
22   virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE;
23   virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE;
24   virtual bool CanSendRequest() const OVERRIDE;
25   virtual bool HasAccessToken() const OVERRIDE;
26   virtual void RequestAccessToken(
27       const google_apis::AuthStatusCallback& callback) OVERRIDE;
28   virtual bool HasRefreshToken() const OVERRIDE;
29   virtual void ClearAccessToken() OVERRIDE;
30   virtual void ClearRefreshToken() OVERRIDE;
31   virtual std::string GetRootResourceId() const OVERRIDE;
32   virtual google_apis::CancelCallback GetAllFileList(
33       const google_apis::FileListCallback& callback) OVERRIDE;
34   virtual google_apis::CancelCallback GetFileListInDirectory(
35       const std::string& directory_resource_id,
36       const google_apis::FileListCallback& callback) OVERRIDE;
37   virtual google_apis::CancelCallback Search(
38       const std::string& search_query,
39       const google_apis::FileListCallback& callback) OVERRIDE;
40   virtual google_apis::CancelCallback SearchByTitle(
41       const std::string& title,
42       const std::string& directory_resource_id,
43       const google_apis::FileListCallback& callback) OVERRIDE;
44   virtual google_apis::CancelCallback GetChangeList(
45       int64 start_changestamp,
46       const google_apis::ChangeListCallback& callback) OVERRIDE;
47   virtual google_apis::CancelCallback GetRemainingChangeList(
48       const GURL& next_link,
49       const google_apis::ChangeListCallback& callback) OVERRIDE;
50   virtual google_apis::CancelCallback GetRemainingFileList(
51       const GURL& next_link,
52       const google_apis::FileListCallback& callback) OVERRIDE;
53   virtual google_apis::CancelCallback GetFileResource(
54       const std::string& resource_id,
55       const google_apis::FileResourceCallback& callback) OVERRIDE;
56   virtual google_apis::CancelCallback GetShareUrl(
57       const std::string& resource_id,
58       const GURL& embed_origin,
59       const google_apis::GetShareUrlCallback& callback) OVERRIDE;
60   virtual google_apis::CancelCallback GetAboutResource(
61       const google_apis::AboutResourceCallback& callback) OVERRIDE;
62   virtual google_apis::CancelCallback GetAppList(
63       const google_apis::AppListCallback& callback) OVERRIDE;
64   virtual google_apis::CancelCallback DeleteResource(
65       const std::string& resource_id,
66       const std::string& etag,
67       const google_apis::EntryActionCallback& callback) OVERRIDE;
68   virtual google_apis::CancelCallback TrashResource(
69       const std::string& resource_id,
70       const google_apis::EntryActionCallback& callback) OVERRIDE;
71   virtual 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   virtual 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   virtual 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   virtual 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   virtual 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   virtual 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   virtual 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   virtual 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   virtual 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   virtual google_apis::CancelCallback GetUploadStatus(
126       const GURL& upload_url,
127       int64 content_length,
128       const google_apis::drive::UploadRangeCallback& callback) OVERRIDE;
129   virtual google_apis::CancelCallback AuthorizeApp(
130       const std::string& resource_id,
131       const std::string& app_id,
132       const google_apis::AuthorizeAppCallback& callback) OVERRIDE;
133   virtual google_apis::CancelCallback UninstallApp(
134       const std::string& app_id,
135       const google_apis::EntryActionCallback& callback) OVERRIDE;
136   virtual 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_