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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 ClientContext context; | 201 ClientContext context; |
| 202 | 202 |
| 203 // The number of times the jobs is retried due to server errors. | 203 // The number of times the jobs is retried due to server errors. |
| 204 int retry_count; | 204 int retry_count; |
| 205 | 205 |
| 206 // The callback to start the job. Called each time it is retry. | 206 // The callback to start the job. Called each time it is retry. |
| 207 base::Callback<google_apis::CancelCallback()> task; | 207 base::Callback<google_apis::CancelCallback()> task; |
| 208 | 208 |
| 209 // The callback to cancel the running job. It is returned from task.Run(). | 209 // The callback to cancel the running job. It is returned from task.Run(). |
| 210 google_apis::CancelCallback cancel_callback; | 210 google_apis::CancelCallback cancel_callback; |
| 211 | |
| 212 // The callback to notify an error to the client of JobScheduler. | |
| 213 // This is used to notify cancel of a job that is not running yet. | |
| 214 base::Callback<void(google_apis::GDataErrorCode)> abort; | |
|
hashimoto
2013/06/20 03:51:54
nit: Can we make this variable's name a noun? (e.g
kinaba
2013/06/21 01:59:22
Done.
| |
| 211 }; | 215 }; |
| 212 | 216 |
| 213 // Parameters for DriveUploader::ResumeUploadFile. | 217 // Parameters for DriveUploader::ResumeUploadFile. |
| 214 struct ResumeUploadParams; | 218 struct ResumeUploadParams; |
| 215 | 219 |
| 216 // Creates a new job and add it to the job map. | 220 // Creates a new job and add it to the job map. |
| 217 JobEntry* CreateNewJob(JobType type); | 221 JobEntry* CreateNewJob(JobType type); |
| 218 | 222 |
| 219 // Adds the specified job to the queue and starts the job loop for the queue | 223 // Adds the specified job to the queue and starts the job loop for the queue |
| 220 // if needed. | 224 // if needed. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 | 343 |
| 340 // Note: This should remain the last member so it'll be destroyed and | 344 // Note: This should remain the last member so it'll be destroyed and |
| 341 // invalidate its weak pointers before any other members are destroyed. | 345 // invalidate its weak pointers before any other members are destroyed. |
| 342 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; | 346 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; |
| 343 DISALLOW_COPY_AND_ASSIGN(JobScheduler); | 347 DISALLOW_COPY_AND_ASSIGN(JobScheduler); |
| 344 }; | 348 }; |
| 345 | 349 |
| 346 } // namespace drive | 350 } // namespace drive |
| 347 | 351 |
| 348 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ | 352 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_SCHEDULER_H_ |
| OLD | NEW |