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 COMPONENTS_DRIVE_JOB_SCHEDULER_H_ | 5 #ifndef COMPONENTS_DRIVE_JOB_SCHEDULER_H_ |
| 6 #define COMPONENTS_DRIVE_JOB_SCHEDULER_H_ | 6 #define COMPONENTS_DRIVE_JOB_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 // Jobs should not start running until this time. Used for throttling. | 375 // Jobs should not start running until this time. Used for throttling. |
| 376 base::Time wait_until_; | 376 base::Time wait_until_; |
| 377 | 377 |
| 378 // Disables throttling for testing. | 378 // Disables throttling for testing. |
| 379 bool disable_throttling_; | 379 bool disable_throttling_; |
| 380 | 380 |
| 381 // The queues of jobs. | 381 // The queues of jobs. |
| 382 std::unique_ptr<JobQueue> queue_[NUM_QUEUES]; | 382 std::unique_ptr<JobQueue> queue_[NUM_QUEUES]; |
| 383 | 383 |
| 384 // The list of queued job info indexed by job IDs. | 384 // The list of queued job info indexed by job IDs. |
| 385 typedef IDMap<JobEntry, IDMapOwnPointer> JobIDMap; | 385 typedef IDMap<std::unique_ptr<JobEntry>> JobIDMap; |
|
danakj
2016/11/30 23:02:21
s/typedef/using/ while you're here?
| |
| 386 JobIDMap job_map_; | 386 JobIDMap job_map_; |
| 387 | 387 |
| 388 // The list of observers for the scheduler. | 388 // The list of observers for the scheduler. |
| 389 base::ObserverList<JobListObserver> observer_list_; | 389 base::ObserverList<JobListObserver> observer_list_; |
| 390 | 390 |
| 391 EventLogger* logger_; | 391 EventLogger* logger_; |
| 392 DriveServiceInterface* drive_service_; | 392 DriveServiceInterface* drive_service_; |
| 393 base::SequencedTaskRunner* blocking_task_runner_; | 393 base::SequencedTaskRunner* blocking_task_runner_; |
| 394 std::unique_ptr<DriveUploaderInterface> uploader_; | 394 std::unique_ptr<DriveUploaderInterface> uploader_; |
| 395 | 395 |
| 396 PrefService* pref_service_; | 396 PrefService* pref_service_; |
| 397 | 397 |
| 398 base::ThreadChecker thread_checker_; | 398 base::ThreadChecker thread_checker_; |
| 399 | 399 |
| 400 // Note: This should remain the last member so it'll be destroyed and | 400 // Note: This should remain the last member so it'll be destroyed and |
| 401 // invalidate its weak pointers before any other members are destroyed. | 401 // invalidate its weak pointers before any other members are destroyed. |
| 402 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; | 402 base::WeakPtrFactory<JobScheduler> weak_ptr_factory_; |
| 403 DISALLOW_COPY_AND_ASSIGN(JobScheduler); | 403 DISALLOW_COPY_AND_ASSIGN(JobScheduler); |
| 404 }; | 404 }; |
| 405 | 405 |
| 406 } // namespace drive | 406 } // namespace drive |
| 407 | 407 |
| 408 #endif // COMPONENTS_DRIVE_JOB_SCHEDULER_H_ | 408 #endif // COMPONENTS_DRIVE_JOB_SCHEDULER_H_ |
| OLD | NEW |