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 "chrome/browser/sync/sync_prefs.h" | 5 #include "chrome/browser/sync/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" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 base::Bind(&SyncPrefs::OnSyncManagedPrefChanged, | 38 base::Bind(&SyncPrefs::OnSyncManagedPrefChanged, |
39 base::Unretained(this))); | 39 base::Unretained(this))); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 SyncPrefs::~SyncPrefs() { | 43 SyncPrefs::~SyncPrefs() { |
44 DCHECK(CalledOnValidThread()); | 44 DCHECK(CalledOnValidThread()); |
45 } | 45 } |
46 | 46 |
47 // static | 47 // static |
48 void SyncPrefs::RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) { | 48 void SyncPrefs::RegisterProfilePrefs( |
49 // TODO(joi): Remove |prefs| parameter. | 49 user_prefs::PrefRegistrySyncable* registry) { |
Mattias Nissler (ping if slow)
2013/07/04 11:41:59
Thanks for cleaning this up.
| |
50 registry->RegisterBooleanPref( | 50 registry->RegisterBooleanPref( |
51 prefs::kSyncHasSetupCompleted, | 51 prefs::kSyncHasSetupCompleted, |
52 false, | 52 false, |
53 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 53 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
54 registry->RegisterBooleanPref( | 54 registry->RegisterBooleanPref( |
55 prefs::kSyncSuppressStart, | 55 prefs::kSyncSuppressStart, |
56 false, | 56 false, |
57 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 57 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
58 registry->RegisterInt64Pref( | 58 registry->RegisterInt64Pref( |
59 prefs::kSyncLastSyncedTime, | 59 prefs::kSyncLastSyncedTime, |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
495 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); | 495 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); |
496 i != pref_groups_.end(); ++i) { | 496 i != pref_groups_.end(); ++i) { |
497 if (types.Has(i->first)) | 497 if (types.Has(i->first)) |
498 types_with_groups.PutAll(i->second); | 498 types_with_groups.PutAll(i->second); |
499 } | 499 } |
500 types_with_groups.RetainAll(registered_types); | 500 types_with_groups.RetainAll(registered_types); |
501 return types_with_groups; | 501 return types_with_groups; |
502 } | 502 } |
503 | 503 |
504 } // namespace browser_sync | 504 } // namespace browser_sync |
OLD | NEW |