Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 void GetFileResource(const std::string& resource_id, | |
|
hashimoto
2014/07/09 07:48:57
GetFileResource() is already present.
No need to a
| |
| 87 const google_apis::FileResourceCallback& callback); | |
| 88 | |
| 89 // Adds a GetAllResourceList operation to the queue. | |
| 86 // Adds a GetAllFileList operation to the queue. | 90 // Adds a GetAllFileList operation to the queue. |
| 87 // |callback| must not be null. | 91 // |callback| must not be null. |
| 88 void GetAllFileList(const google_apis::FileListCallback& callback); | 92 void GetAllFileList(const google_apis::FileListCallback& callback); |
| 89 | 93 |
| 90 // Adds a GetFileListInDirectory operation to the queue. | 94 // Adds a GetFileListInDirectory operation to the queue. |
| 91 // |callback| must not be null. | 95 // |callback| must not be null. |
| 92 void GetFileListInDirectory(const std::string& directory_resource_id, | 96 void GetFileListInDirectory(const std::string& directory_resource_id, |
| 93 const google_apis::FileListCallback& callback); | 97 const google_apis::FileListCallback& callback); |
| 94 | 98 |
| 95 // Adds a Search operation to the queue. | 99 // Adds a Search operation to the queue. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 110 // Adds GetRemainingFileList operation to the queue. | 114 // Adds GetRemainingFileList operation to the queue. |
| 111 // |callback| must not be null. | 115 // |callback| must not be null. |
| 112 void GetRemainingFileList(const GURL& next_link, | 116 void GetRemainingFileList(const GURL& next_link, |
| 113 const google_apis::FileListCallback& callback); | 117 const google_apis::FileListCallback& callback); |
| 114 | 118 |
| 115 // Adds a GetFileResource operation to the queue. | 119 // Adds a GetFileResource operation to the queue. |
| 116 void GetFileResource(const std::string& resource_id, | 120 void GetFileResource(const std::string& resource_id, |
| 117 const ClientContext& context, | 121 const ClientContext& context, |
| 118 const google_apis::FileResourceCallback& callback); | 122 const google_apis::FileResourceCallback& callback); |
| 119 | 123 |
| 120 // Adds a GetShareUrl operation to the queue. | 124 // Adds a GetUrl operation to the queue. |
| 121 void GetShareUrl(const std::string& resource_id, | 125 void GetShareUrl(const std::string& resource_id, |
| 122 const GURL& embed_origin, | 126 const GURL& embed_origin, |
| 123 const ClientContext& context, | 127 const ClientContext& context, |
| 124 const google_apis::GetShareUrlCallback& callback); | 128 const google_apis::GetUrlCallback& callback); |
| 125 | 129 |
| 126 // Adds a TrashResource operation to the queue. | 130 // Adds a TrashResource operation to the queue. |
| 127 void TrashResource(const std::string& resource_id, | 131 void TrashResource(const std::string& resource_id, |
| 128 const ClientContext& context, | 132 const ClientContext& context, |
| 129 const google_apis::EntryActionCallback& callback); | 133 const google_apis::EntryActionCallback& callback); |
| 130 | 134 |
| 131 // Adds a CopyResource operation to the queue. | 135 // Adds a CopyResource operation to the queue. |
| 132 void CopyResource(const std::string& resource_id, | 136 void CopyResource(const std::string& resource_id, |
| 133 const std::string& parent_resource_id, | 137 const std::string& parent_resource_id, |
| 134 const std::string& new_title, | 138 const std::string& new_title, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 scoped_ptr<google_apis::FileResource> entry); | 296 scoped_ptr<google_apis::FileResource> entry); |
| 293 | 297 |
| 294 // Callback for job finishing with a AboutResourceCallback. | 298 // Callback for job finishing with a AboutResourceCallback. |
| 295 void OnGetAboutResourceJobDone( | 299 void OnGetAboutResourceJobDone( |
| 296 JobID job_id, | 300 JobID job_id, |
| 297 const google_apis::AboutResourceCallback& callback, | 301 const google_apis::AboutResourceCallback& callback, |
| 298 google_apis::GDataErrorCode error, | 302 google_apis::GDataErrorCode error, |
| 299 scoped_ptr<google_apis::AboutResource> about_resource); | 303 scoped_ptr<google_apis::AboutResource> about_resource); |
| 300 | 304 |
| 301 // Callback for job finishing with a GetShareUrlCallback. | 305 // Callback for job finishing with a GetShareUrlCallback. |
| 302 void OnGetShareUrlJobDone( | 306 void OnGetShareUrlJobDone(JobID job_id, |
| 303 JobID job_id, | 307 const google_apis::GetUrlCallback& callback, |
| 304 const google_apis::GetShareUrlCallback& callback, | 308 google_apis::GDataErrorCode error, |
| 305 google_apis::GDataErrorCode error, | 309 const GURL& share_url); |
| 306 const GURL& share_url); | |
| 307 | 310 |
| 308 // Callback for job finishing with a AppListCallback. | 311 // Callback for job finishing with a AppListCallback. |
| 309 void OnGetAppListJobDone( | 312 void OnGetAppListJobDone( |
| 310 JobID job_id, | 313 JobID job_id, |
| 311 const google_apis::AppListCallback& callback, | 314 const google_apis::AppListCallback& callback, |
| 312 google_apis::GDataErrorCode error, | 315 google_apis::GDataErrorCode error, |
| 313 scoped_ptr<google_apis::AppList> app_list); | 316 scoped_ptr<google_apis::AppList> app_list); |
| 314 | 317 |
| 315 // Callback for job finishing with a EntryActionCallback. | 318 // Callback for job finishing with a EntryActionCallback. |
| 316 void OnEntryActionJobDone(JobID job_id, | 319 void OnEntryActionJobDone(JobID job_id, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 | 402 |
| 400 // Note: This should remain the last member so it'll be destroyed and | 403 // Note: This should remain the last member so it'll be destroyed and |
| 401 // invalidate its weak pointers before any other members are destroyed. | 404 // invalidate its weak pointers before any other members are destroyed. |
| 402 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; | 405 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; |
| 403 DISALLOW_COPY_AND_ASSIGN(JobScheduler); | 406 DISALLOW_COPY_AND_ASSIGN(JobScheduler); |
| 404 }; | 407 }; |
| 405 | 408 |
| 406 } // namespace drive | 409 } // namespace drive |
| 407 | 410 |
| 408 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ | 411 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ |
| OLD | NEW |