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

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

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 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 "chrome/browser/prefs/pref_model_associator.h" 5 #include "components/syncable_prefs/pref_model_associator.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/prefs/pref_model_associator_client.h" 16 #include "components/syncable_prefs/pref_model_associator_client.h"
17 #include "chrome/browser/prefs/pref_service_syncable.h" 17 #include "components/syncable_prefs/pref_service_syncable.h"
18 #include "sync/api/sync_change.h" 18 #include "sync/api/sync_change.h"
19 #include "sync/api/sync_error_factory.h" 19 #include "sync/api/sync_error_factory.h"
20 #include "sync/protocol/preference_specifics.pb.h" 20 #include "sync/protocol/preference_specifics.pb.h"
21 #include "sync/protocol/sync.pb.h" 21 #include "sync/protocol/sync.pb.h"
22 22
23 using syncer::PREFERENCES; 23 using syncer::PREFERENCES;
24 using syncer::PRIORITY_PREFERENCES; 24 using syncer::PRIORITY_PREFERENCES;
25 25
26 namespace { 26 namespace {
27 27
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 void PrefModelAssociator::NotifySyncedPrefObservers(const std::string& path, 615 void PrefModelAssociator::NotifySyncedPrefObservers(const std::string& path,
616 bool from_sync) const { 616 bool from_sync) const {
617 SyncedPrefObserverMap::const_iterator observer_iter = 617 SyncedPrefObserverMap::const_iterator observer_iter =
618 synced_pref_observers_.find(path); 618 synced_pref_observers_.find(path);
619 if (observer_iter == synced_pref_observers_.end()) 619 if (observer_iter == synced_pref_observers_.end())
620 return; 620 return;
621 SyncedPrefObserverList* observers = observer_iter->second; 621 SyncedPrefObserverList* observers = observer_iter->second;
622 FOR_EACH_OBSERVER(SyncedPrefObserver, *observers, 622 FOR_EACH_OBSERVER(SyncedPrefObserver, *observers,
623 OnSyncedPrefChanged(path, from_sync)); 623 OnSyncedPrefChanged(path, from_sync));
624 } 624 }
OLDNEW
« no previous file with comments | « components/syncable_prefs/pref_model_associator.h ('k') | components/syncable_prefs/pref_model_associator_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698