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

Unified Diff: components/drive/job_scheduler.cc

Issue 2421083002: Replace FOR_EACH_OBSERVER in components/drive with range-based for (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/drive/drive_notification_manager.cc ('k') | components/drive/service/drive_api_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/job_scheduler.cc
diff --git a/components/drive/job_scheduler.cc b/components/drive/job_scheduler.cc
index d7cd8353104d33d05082c2e2de964985939bb254..6dd96b9375d7dace712b70c252ea499bad644f88 100644
--- a/components/drive/job_scheduler.cc
+++ b/components/drive/job_scheduler.cc
@@ -1160,19 +1160,21 @@ void JobScheduler::AbortNotRunningJob(JobEntry* job,
void JobScheduler::NotifyJobAdded(const JobInfo& job_info) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(JobListObserver, observer_list_, OnJobAdded(job_info));
+ for (auto& observer : observer_list_)
+ observer.OnJobAdded(job_info);
}
void JobScheduler::NotifyJobDone(const JobInfo& job_info,
google_apis::DriveApiErrorCode error) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(JobListObserver, observer_list_,
- OnJobDone(job_info, GDataToFileError(error)));
+ for (auto& observer : observer_list_)
+ observer.OnJobDone(job_info, GDataToFileError(error));
}
void JobScheduler::NotifyJobUpdated(const JobInfo& job_info) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(JobListObserver, observer_list_, OnJobUpdated(job_info));
+ for (auto& observer : observer_list_)
+ observer.OnJobUpdated(job_info);
}
std::string JobScheduler::GetQueueInfo(QueueType type) const {
« no previous file with comments | « components/drive/drive_notification_manager.cc ('k') | components/drive/service/drive_api_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698