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 #ifndef CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
6 #define CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 6 #define CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe), | 50 class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe), |
51 public base::SupportsWeakPtr<SyncPrefs> { | 51 public base::SupportsWeakPtr<SyncPrefs> { |
52 public: | 52 public: |
53 // |pref_service| may be NULL (for unit tests), but in that case no | 53 // |pref_service| may be NULL (for unit tests), but in that case no |
54 // setter methods should be called. Does not take ownership of | 54 // setter methods should be called. Does not take ownership of |
55 // |pref_service|. | 55 // |pref_service|. |
56 explicit SyncPrefs(PrefService* pref_service); | 56 explicit SyncPrefs(PrefService* pref_service); |
57 | 57 |
58 virtual ~SyncPrefs(); | 58 virtual ~SyncPrefs(); |
59 | 59 |
60 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 60 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
61 | 61 |
62 void AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer); | 62 void AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer); |
63 void RemoveSyncPrefObserver(SyncPrefObserver* sync_pref_observer); | 63 void RemoveSyncPrefObserver(SyncPrefObserver* sync_pref_observer); |
64 | 64 |
65 // Clears important sync preferences. | 65 // Clears important sync preferences. |
66 void ClearPreferences(); | 66 void ClearPreferences(); |
67 | 67 |
68 // Getters and setters for global sync prefs. | 68 // Getters and setters for global sync prefs. |
69 | 69 |
70 bool HasSyncSetupCompleted() const; | 70 bool HasSyncSetupCompleted() const; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // etc. | 166 // etc. |
167 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 167 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
168 PrefGroupsMap pref_groups_; | 168 PrefGroupsMap pref_groups_; |
169 | 169 |
170 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 170 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
171 }; | 171 }; |
172 | 172 |
173 } // namespace browser_sync | 173 } // namespace browser_sync |
174 | 174 |
175 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 175 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
OLD | NEW |