| 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 #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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 DCHECK(pref_service_ == NULL); | 531 DCHECK(pref_service_ == NULL); |
| 532 pref_service_ = pref_service; | 532 pref_service_ = pref_service; |
| 533 } | 533 } |
| 534 | 534 |
| 535 void PrefModelAssociator::NotifySyncedPrefObservers(const std::string& path, | 535 void PrefModelAssociator::NotifySyncedPrefObservers(const std::string& path, |
| 536 bool from_sync) const { | 536 bool from_sync) const { |
| 537 auto observer_iter = synced_pref_observers_.find(path); | 537 auto observer_iter = synced_pref_observers_.find(path); |
| 538 if (observer_iter == synced_pref_observers_.end()) | 538 if (observer_iter == synced_pref_observers_.end()) |
| 539 return; | 539 return; |
| 540 SyncedPrefObserverList* observers = observer_iter->second.get(); | 540 SyncedPrefObserverList* observers = observer_iter->second.get(); |
| 541 FOR_EACH_OBSERVER(SyncedPrefObserver, *observers, | 541 for (auto& observer : *observers) |
| 542 OnSyncedPrefChanged(path, from_sync)); | 542 observer.OnSyncedPrefChanged(path, from_sync); |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace syncable_prefs | 545 } // namespace syncable_prefs |
| OLD | NEW |