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

Side by Side Diff: components/sync_driver/sync_prefs.cc

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « components/sync_driver/DEPS ('k') | components/sync_driver/sync_prefs_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « components/sync_driver/DEPS ('k') | components/sync_driver/sync_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698