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

Side by Side Diff: components/syncable_prefs/pref_model_associator.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 #include "components/syncable_prefs/pref_model_associator.h" 5 #include "components/syncable_prefs/pref_model_associator.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 type_(type), 63 type_(type),
64 client_(client) { 64 client_(client) {
65 DCHECK(CalledOnValidThread()); 65 DCHECK(CalledOnValidThread());
66 DCHECK(type_ == PREFERENCES || type_ == PRIORITY_PREFERENCES); 66 DCHECK(type_ == PREFERENCES || type_ == PRIORITY_PREFERENCES);
67 } 67 }
68 68
69 PrefModelAssociator::~PrefModelAssociator() { 69 PrefModelAssociator::~PrefModelAssociator() {
70 DCHECK(CalledOnValidThread()); 70 DCHECK(CalledOnValidThread());
71 pref_service_ = NULL; 71 pref_service_ = NULL;
72 72
73 STLDeleteContainerPairSecondPointers(synced_pref_observers_.begin(), 73 base::STLDeleteContainerPairSecondPointers(synced_pref_observers_.begin(),
74 synced_pref_observers_.end()); 74 synced_pref_observers_.end());
75 synced_pref_observers_.clear(); 75 synced_pref_observers_.clear();
76 } 76 }
77 77
78 void PrefModelAssociator::InitPrefAndAssociate( 78 void PrefModelAssociator::InitPrefAndAssociate(
79 const syncer::SyncData& sync_pref, 79 const syncer::SyncData& sync_pref,
80 const std::string& pref_name, 80 const std::string& pref_name,
81 syncer::SyncChangeList* sync_changes) { 81 syncer::SyncChangeList* sync_changes) {
82 const base::Value* user_pref_value = pref_service_->GetUserPrefValue( 82 const base::Value* user_pref_value = pref_service_->GetUserPrefValue(
83 pref_name.c_str()); 83 pref_name.c_str());
84 VLOG(1) << "Associating preference " << pref_name; 84 VLOG(1) << "Associating preference " << pref_name;
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 SyncedPrefObserverMap::const_iterator observer_iter = 543 SyncedPrefObserverMap::const_iterator observer_iter =
544 synced_pref_observers_.find(path); 544 synced_pref_observers_.find(path);
545 if (observer_iter == synced_pref_observers_.end()) 545 if (observer_iter == synced_pref_observers_.end())
546 return; 546 return;
547 SyncedPrefObserverList* observers = observer_iter->second; 547 SyncedPrefObserverList* observers = observer_iter->second;
548 FOR_EACH_OBSERVER(SyncedPrefObserver, *observers, 548 FOR_EACH_OBSERVER(SyncedPrefObserver, *observers,
549 OnSyncedPrefChanged(path, from_sync)); 549 OnSyncedPrefChanged(path, from_sync));
550 } 550 }
551 551
552 } // namespace syncable_prefs 552 } // namespace syncable_prefs
OLDNEW
« no previous file with comments | « components/sync_sessions/synced_session_tracker.cc ('k') | components/update_client/update_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698