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

Side by Side Diff: chrome/browser/chromeos/drive/drive_scheduler.h

Issue 13450006: Support new methods to replace GetResourceList on DriveScheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SCHEDULER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SCHEDULER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SCHEDULER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SCHEDULER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 14 matching lines...) Expand all
25 // of each. See: crbug.com/154243 25 // of each. See: crbug.com/154243
26 class DriveScheduler 26 class DriveScheduler
27 : public net::NetworkChangeNotifier::ConnectionTypeObserver { 27 : public net::NetworkChangeNotifier::ConnectionTypeObserver {
28 public: 28 public:
29 // Enum representing the type of job. 29 // Enum representing the type of job.
30 enum JobType { 30 enum JobType {
31 TYPE_GET_ABOUT_RESOURCE, 31 TYPE_GET_ABOUT_RESOURCE,
32 TYPE_GET_ACCOUNT_METADATA, 32 TYPE_GET_ACCOUNT_METADATA,
33 TYPE_GET_APP_LIST, 33 TYPE_GET_APP_LIST,
34 TYPE_GET_RESOURCE_LIST, 34 TYPE_GET_RESOURCE_LIST,
35 TYPE_GET_ALL_RESOURCE_LIST,
36 TYPE_GET_RESOURCE_LIST_IN_DIRECTORY,
37 TYPE_SEARCH,
38 TYPE_GET_CHANGE_LIST,
39 TYPE_CONTINUE_GET_RESOURCE_LIST,
35 TYPE_GET_RESOURCE_ENTRY, 40 TYPE_GET_RESOURCE_ENTRY,
36 TYPE_DELETE_RESOURCE, 41 TYPE_DELETE_RESOURCE,
37 TYPE_COPY_HOSTED_DOCUMENT, 42 TYPE_COPY_HOSTED_DOCUMENT,
38 TYPE_RENAME_RESOURCE, 43 TYPE_RENAME_RESOURCE,
39 TYPE_ADD_RESOURCE_TO_DIRECTORY, 44 TYPE_ADD_RESOURCE_TO_DIRECTORY,
40 TYPE_REMOVE_RESOURCE_FROM_DIRECTORY, 45 TYPE_REMOVE_RESOURCE_FROM_DIRECTORY,
41 TYPE_ADD_NEW_DIRECTORY, 46 TYPE_ADD_NEW_DIRECTORY,
42 TYPE_DOWNLOAD_FILE, 47 TYPE_DOWNLOAD_FILE,
43 TYPE_UPLOAD_NEW_FILE, 48 TYPE_UPLOAD_NEW_FILE,
44 TYPE_UPLOAD_EXISTING_FILE, 49 TYPE_UPLOAD_EXISTING_FILE,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void GetAboutResource(const google_apis::GetAboutResourceCallback& callback); 106 void GetAboutResource(const google_apis::GetAboutResourceCallback& callback);
102 107
103 // Adds a GetResourceList operation to the queue. 108 // Adds a GetResourceList operation to the queue.
104 // |callback| must not be null. 109 // |callback| must not be null.
105 void GetResourceList(const GURL& feed_url, 110 void GetResourceList(const GURL& feed_url,
106 int64 start_changestamp, 111 int64 start_changestamp,
107 const std::string& search_query, 112 const std::string& search_query,
108 const std::string& directory_resource_id, 113 const std::string& directory_resource_id,
109 const google_apis::GetResourceListCallback& callback); 114 const google_apis::GetResourceListCallback& callback);
110 115
116 // Adds a GetAllResourceList operation to the queue.
117 // |callback| must not be null.
118 void GetAllResourceList(const google_apis::GetResourceListCallback& callback);
119
120 // Adds a GetResourceListInDirectory operation to the queue.
121 // |callback| must not be null.
122 void GetResourceListInDirectory(
123 const std::string& directory_resource_id,
124 const google_apis::GetResourceListCallback& callback);
125
126 // Adds a Search operation to the queue.
127 // |callback| must not be null.
128 void Search(const std::string& search_query,
129 const google_apis::GetResourceListCallback& callback);
130
131 // Adds a GetChangeList operation to the queue.
132 // |callback| must not be null.
133 void GetChangeList(int64 start_changestamp,
134 const google_apis::GetResourceListCallback& callback);
135
136 // Adds ContinueGetResourceList operation to the queue.
137 // |callback| must not be null.
138 void ContinueGetResourceList(
139 const GURL& feed_url,
140 const google_apis::GetResourceListCallback& callback);
141
111 // Adds a GetResourceEntry operation to the queue. 142 // Adds a GetResourceEntry operation to the queue.
112 void GetResourceEntry(const std::string& resource_id, 143 void GetResourceEntry(const std::string& resource_id,
113 const DriveClientContext& context, 144 const DriveClientContext& context,
114 const google_apis::GetResourceEntryCallback& callback); 145 const google_apis::GetResourceEntryCallback& callback);
115 146
116 147
117 // Adds a DeleteResource operation to the queue. 148 // Adds a DeleteResource operation to the queue.
118 void DeleteResource(const std::string& resource_id, 149 void DeleteResource(const std::string& resource_id,
119 const google_apis::EntryActionCallback& callback); 150 const google_apis::EntryActionCallback& callback);
120 151
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Used by: 241 // Used by:
211 // TYPE_DOWNLOAD_FILE 242 // TYPE_DOWNLOAD_FILE
212 GURL download_url; 243 GURL download_url;
213 244
214 // Online and cache path of the operation's target. 245 // Online and cache path of the operation's target.
215 // Used by: 246 // Used by:
216 // TYPE_DOWNLOAD_FILE 247 // TYPE_DOWNLOAD_FILE
217 base::FilePath virtual_path; 248 base::FilePath virtual_path;
218 base::FilePath local_cache_path; 249 base::FilePath local_cache_path;
219 250
220 // Parameters for GetResourceList(). 251 // Parameter to get change list.
221 // Used by: 252 // Used by:
222 // TYPE_GET_RESOURCE_LIST 253 // TYPE_GET_RESOURCE_LIST
254 // TYPE_GET_CHANGE_LIST
255 int64 start_changestamp;
256
257 // Parameter to get a resource list in a particular directory.
258 // Used by:
259 // TYPE_GET_RESOURCE_LIST
260 // TYPE_GET_RESOURCE_LIST_IN_DIRECTORY
261 std::string directory_resource_id;
262
263 // Parameter to search the resource list
264 // Used by:
265 // TYPE_GET_RESOURCE_LIST
266 // TYPE_SEARCH
267 std::string search_query;
268
269 // Parameter to get remaining results of an operation via
270 // GetResourceListCallback.
271 // Used by:
272 // TYPE_GET_RESOURCE_LIST
273 // TYPE_CONTINUE_GET_RESOURCE_LIST
223 GURL feed_url; 274 GURL feed_url;
224 int64 start_changestamp;
225 std::string search_query;
226 std::string directory_resource_id;
227 275
228 // Parameter for copy or rename. 276 // Parameter for copy or rename.
229 // Used by: 277 // Used by:
230 // TYPE_COPY_HOSTED_DOCUMENT 278 // TYPE_COPY_HOSTED_DOCUMENT
231 // TYPE_RENAME_RESOURCE 279 // TYPE_RENAME_RESOURCE
232 std::string new_name; 280 std::string new_name;
233 281
234 // Parameters for AddNewDirectory 282 // Parameters for AddNewDirectory
235 // Used by: 283 // Used by:
236 // TYPE_ADD_NEW_DIRECTORY 284 // TYPE_ADD_NEW_DIRECTORY
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 456
409 // Note: This should remain the last member so it'll be destroyed and 457 // Note: This should remain the last member so it'll be destroyed and
410 // invalidate its weak pointers before any other members are destroyed. 458 // invalidate its weak pointers before any other members are destroyed.
411 base::WeakPtrFactory<DriveScheduler> weak_ptr_factory_; 459 base::WeakPtrFactory<DriveScheduler> weak_ptr_factory_;
412 DISALLOW_COPY_AND_ASSIGN(DriveScheduler); 460 DISALLOW_COPY_AND_ASSIGN(DriveScheduler);
413 }; 461 };
414 462
415 } // namespace drive 463 } // namespace drive
416 464
417 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SCHEDULER_H_ 465 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698