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

Unified Diff: components/sync/driver/glue/sync_backend_registrar.cc

Issue 2507913002: [Sync] Remove some unnecessary typedefs in SyncBackendRegistrar. (Closed)
Patch Set: Created 4 years, 1 month 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/sync/driver/glue/sync_backend_registrar.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/glue/sync_backend_registrar.cc
diff --git a/components/sync/driver/glue/sync_backend_registrar.cc b/components/sync/driver/glue/sync_backend_registrar.cc
index 4d73be4c0ece4ce52b101cdd6a8897876d0eaad7..4a8d46216c5db2334bc70eaf095d5ece6a49130e 100644
--- a/components/sync/driver/glue/sync_backend_registrar.cc
+++ b/components/sync/driver/glue/sync_backend_registrar.cc
@@ -142,9 +142,8 @@ ModelTypeSet SyncBackendRegistrar::GetLastConfiguredTypes() const {
void SyncBackendRegistrar::RequestWorkerStopOnUIThread() {
DCHECK(ui_thread_checker_.CalledOnValidThread());
base::AutoLock lock(lock_);
- for (WorkerMap::const_iterator it = workers_.begin(); it != workers_.end();
- ++it) {
- it->second->RequestStop();
+ for (const auto& kv : workers_) {
+ kv.second->RequestStop();
}
}
@@ -213,9 +212,8 @@ void SyncBackendRegistrar::GetWorkers(
std::vector<scoped_refptr<ModelSafeWorker>>* out) {
base::AutoLock lock(lock_);
out->clear();
- for (WorkerMap::const_iterator it = workers_.begin(); it != workers_.end();
- ++it) {
- out->push_back(it->second.get());
+ for (const auto& kv : workers_) {
+ out->push_back(kv.second.get());
}
}
@@ -240,8 +238,7 @@ ChangeProcessor* SyncBackendRegistrar::GetProcessor(ModelType type) const {
ChangeProcessor* SyncBackendRegistrar::GetProcessorUnsafe(
ModelType type) const {
lock_.AssertAcquired();
- std::map<ModelType, ChangeProcessor*>::const_iterator it =
- processors_.find(type);
+ auto it = processors_.find(type);
// Until model association happens for a datatype, it will not
// appear in the processors list. During this time, it is OK to
« no previous file with comments | « components/sync/driver/glue/sync_backend_registrar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698