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/sync_driver/sync_prefs.h" | 5 #include "components/sync_driver/sync_prefs.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_member.h" | 9 #include "base/prefs/pref_member.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "components/pref_registry/pref_registry_syncable.h" |
14 #include "components/sync_driver/pref_names.h" | 15 #include "components/sync_driver/pref_names.h" |
15 #include "components/user_prefs/pref_registry_syncable.h" | |
16 | 16 |
17 namespace sync_driver { | 17 namespace sync_driver { |
18 | 18 |
19 SyncPrefObserver::~SyncPrefObserver() {} | 19 SyncPrefObserver::~SyncPrefObserver() {} |
20 | 20 |
21 SyncPrefs::SyncPrefs(PrefService* pref_service) : pref_service_(pref_service) { | 21 SyncPrefs::SyncPrefs(PrefService* pref_service) : pref_service_(pref_service) { |
22 DCHECK(pref_service); | 22 DCHECK(pref_service); |
23 RegisterPrefGroups(); | 23 RegisterPrefGroups(); |
24 // Watch the preference that indicates sync is managed so we can take | 24 // Watch the preference that indicates sync is managed so we can take |
25 // appropriate action. | 25 // appropriate action. |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 i != pref_groups_.end(); | 465 i != pref_groups_.end(); |
466 ++i) { | 466 ++i) { |
467 if (types.Has(i->first)) | 467 if (types.Has(i->first)) |
468 types_with_groups.PutAll(i->second); | 468 types_with_groups.PutAll(i->second); |
469 } | 469 } |
470 types_with_groups.RetainAll(registered_types); | 470 types_with_groups.RetainAll(registered_types); |
471 return types_with_groups; | 471 return types_with_groups; |
472 } | 472 } |
473 | 473 |
474 } // namespace browser_sync | 474 } // namespace browser_sync |
OLD | NEW |