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

Side by Side Diff: chrome/browser/sync/sync_prefs.h

Issue 59793008: sync: don't allow NULL profile in ProfileSyncService and friends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 years, 1 month 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 | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/sync_prefs.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 #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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // 43 //
44 // profile_sync_service_startup_unittest.cc 44 // profile_sync_service_startup_unittest.cc
45 // profile_sync_service.cc 45 // profile_sync_service.cc
46 // sync_setup_flow.cc 46 // sync_setup_flow.cc
47 // sync_setup_wizard.cc 47 // sync_setup_wizard.cc
48 // sync_setup_wizard_unittest.cc 48 // sync_setup_wizard_unittest.cc
49 // two_client_preferences_sync_test.cc 49 // two_client_preferences_sync_test.cc
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 not be NULL.
54 // setter methods should be called. Does not take ownership of 54 // Does not take ownership of |pref_service|.
55 // |pref_service|.
56 explicit SyncPrefs(PrefService* pref_service); 55 explicit SyncPrefs(PrefService* pref_service);
57 56
58 virtual ~SyncPrefs(); 57 virtual ~SyncPrefs();
59 58
60 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 59 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
61 60
62 void AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer); 61 void AddSyncPrefObserver(SyncPrefObserver* sync_pref_observer);
63 void RemoveSyncPrefObserver(SyncPrefObserver* sync_pref_observer); 62 void RemoveSyncPrefObserver(SyncPrefObserver* sync_pref_observer);
64 63
65 // Clears important sync preferences. 64 // Clears important sync preferences.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // etc. 168 // etc.
170 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; 169 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap;
171 PrefGroupsMap pref_groups_; 170 PrefGroupsMap pref_groups_;
172 171
173 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); 172 DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
174 }; 173 };
175 174
176 } // namespace browser_sync 175 } // namespace browser_sync
177 176
178 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ 177 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_unittest.cc ('k') | chrome/browser/sync/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698