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

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

Issue 318873003: drive: Stop returning ResourceList from JobScheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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_JOB_SCHEDULER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void CancelAllJobs() OVERRIDE; 76 virtual void CancelAllJobs() OVERRIDE;
77 77
78 // Adds a GetAppList operation to the queue. 78 // Adds a GetAppList operation to the queue.
79 // |callback| must not be null. 79 // |callback| must not be null.
80 void GetAppList(const google_apis::AppListCallback& callback); 80 void GetAppList(const google_apis::AppListCallback& callback);
81 81
82 // Adds a GetAboutResource operation to the queue. 82 // Adds a GetAboutResource operation to the queue.
83 // |callback| must not be null. 83 // |callback| must not be null.
84 void GetAboutResource(const google_apis::AboutResourceCallback& callback); 84 void GetAboutResource(const google_apis::AboutResourceCallback& callback);
85 85
86 // Adds a GetAllResourceList operation to the queue. 86 // Adds a GetAllFileList operation to the queue.
87 // |callback| must not be null. 87 // |callback| must not be null.
88 void GetAllResourceList(const google_apis::GetResourceListCallback& callback); 88 void GetAllFileList(const google_apis::FileListCallback& callback);
89 89
90 // Adds a GetResourceListInDirectory operation to the queue. 90 // Adds a GetFileListInDirectory operation to the queue.
91 // |callback| must not be null. 91 // |callback| must not be null.
92 void GetResourceListInDirectory( 92 void GetFileListInDirectory(const std::string& directory_resource_id,
93 const std::string& directory_resource_id, 93 const google_apis::FileListCallback& callback);
94 const google_apis::GetResourceListCallback& callback);
95 94
96 // Adds a Search operation to the queue. 95 // Adds a Search operation to the queue.
97 // |callback| must not be null. 96 // |callback| must not be null.
98 void Search(const std::string& search_query, 97 void Search(const std::string& search_query,
99 const google_apis::GetResourceListCallback& callback); 98 const google_apis::FileListCallback& callback);
100 99
101 // Adds a GetChangeList operation to the queue. 100 // Adds a GetChangeList operation to the queue.
102 // |callback| must not be null. 101 // |callback| must not be null.
103 void GetChangeList(int64 start_changestamp, 102 void GetChangeList(int64 start_changestamp,
104 const google_apis::GetResourceListCallback& callback); 103 const google_apis::ChangeListCallback& callback);
105 104
106 // Adds GetRemainingChangeList operation to the queue. 105 // Adds GetRemainingChangeList operation to the queue.
107 // |callback| must not be null. 106 // |callback| must not be null.
108 void GetRemainingChangeList( 107 void GetRemainingChangeList(const GURL& next_link,
109 const GURL& next_link, 108 const google_apis::ChangeListCallback& callback);
110 const google_apis::GetResourceListCallback& callback);
111 109
112 // Adds GetRemainingFileList operation to the queue. 110 // Adds GetRemainingFileList operation to the queue.
113 // |callback| must not be null. 111 // |callback| must not be null.
114 void GetRemainingFileList( 112 void GetRemainingFileList(const GURL& next_link,
115 const GURL& next_link, 113 const google_apis::FileListCallback& callback);
116 const google_apis::GetResourceListCallback& callback);
117 114
118 // Adds a GetResourceEntry operation to the queue. 115 // Adds a GetResourceEntry operation to the queue.
119 void GetResourceEntry(const std::string& resource_id, 116 void GetResourceEntry(const std::string& resource_id,
120 const ClientContext& context, 117 const ClientContext& context,
121 const google_apis::GetResourceEntryCallback& callback); 118 const google_apis::GetResourceEntryCallback& callback);
122 119
123 // Adds a GetShareUrl operation to the queue. 120 // Adds a GetShareUrl operation to the queue.
124 void GetShareUrl(const std::string& resource_id, 121 void GetShareUrl(const std::string& resource_id,
125 const GURL& embed_origin, 122 const GURL& embed_origin,
126 const ClientContext& context, 123 const ClientContext& context,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 268
272 // Updates |wait_until_| to throttle requests. 269 // Updates |wait_until_| to throttle requests.
273 void UpdateWait(); 270 void UpdateWait();
274 271
275 // Retries the job if needed and returns false. Otherwise returns true. 272 // Retries the job if needed and returns false. Otherwise returns true.
276 bool OnJobDone(JobID job_id, google_apis::GDataErrorCode error); 273 bool OnJobDone(JobID job_id, google_apis::GDataErrorCode error);
277 274
278 // Callback for job finishing with a FileListCallback. 275 // Callback for job finishing with a FileListCallback.
279 void OnGetFileListJobDone( 276 void OnGetFileListJobDone(
280 JobID job_id, 277 JobID job_id,
281 const google_apis::GetResourceListCallback& callback, 278 const google_apis::FileListCallback& callback,
282 google_apis::GDataErrorCode error, 279 google_apis::GDataErrorCode error,
283 scoped_ptr<google_apis::FileList> file_list); 280 scoped_ptr<google_apis::FileList> file_list);
284 281
285 // Callback for job finishing with a ChangeListCallback. 282 // Callback for job finishing with a ChangeListCallback.
286 void OnGetChangeListJobDone( 283 void OnGetChangeListJobDone(
287 JobID job_id, 284 JobID job_id,
288 const google_apis::GetResourceListCallback& callback, 285 const google_apis::ChangeListCallback& callback,
289 google_apis::GDataErrorCode error, 286 google_apis::GDataErrorCode error,
290 scoped_ptr<google_apis::ChangeList> change_list); 287 scoped_ptr<google_apis::ChangeList> change_list);
291 288
292 // Callback for job finishing with a FileResourceCallback. 289 // Callback for job finishing with a FileResourceCallback.
293 void OnGetFileResourceJobDone( 290 void OnGetFileResourceJobDone(
294 JobID job_id, 291 JobID job_id,
295 const google_apis::GetResourceEntryCallback& callback, 292 const google_apis::GetResourceEntryCallback& callback,
296 google_apis::GDataErrorCode error, 293 google_apis::GDataErrorCode error,
297 scoped_ptr<google_apis::FileResource> entry); 294 scoped_ptr<google_apis::FileResource> entry);
298 295
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 401
405 // Note: This should remain the last member so it'll be destroyed and 402 // Note: This should remain the last member so it'll be destroyed and
406 // invalidate its weak pointers before any other members are destroyed. 403 // invalidate its weak pointers before any other members are destroyed.
407 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; 404 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_;
408 DISALLOW_COPY_AND_ASSIGN(JobScheduler); 405 DISALLOW_COPY_AND_ASSIGN(JobScheduler);
409 }; 406 };
410 407
411 } // namespace drive 408 } // namespace drive
412 409
413 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ 410 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/search_operation.cc ('k') | chrome/browser/chromeos/drive/job_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698