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

Side by Side Diff: chrome/browser/api/prefs/pref_service_base.h

Issue 10919066: Use BrowserContext as key in API. Switch Autofill to use BC in place of Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to parent Created 8 years, 3 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 | « no previous file | chrome/browser/api/webdata/web_data_service_base.h » ('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 // This is the base interface for a preference services that provides 5 // This is the base interface for a preference services that provides
6 // a way to access the application's current preferences. 6 // a way to access the application's current preferences.
7 // 7 //
8 // This base interface assumes all preferences are local. See 8 // This base interface assumes all preferences are local. See
9 // SyncablePrefServiceBase for the interface to a preference service 9 // SyncablePrefServiceBase for the interface to a preference service
10 // that stores preferences that can be synced. 10 // that stores preferences that can be synced.
11 // 11 //
12 // Chromium settings and storage represent user-selected preferences and 12 // Chromium settings and storage represent user-selected preferences and
13 // information and MUST not be extracted, overwritten or modified except 13 // information and MUST not be extracted, overwritten or modified except
14 // through Chromium defined APIs. 14 // through Chromium defined APIs.
15 15
16 #ifndef CHROME_BROWSER_API_PREFS_PREF_SERVICE_BASE_H_ 16 #ifndef CHROME_BROWSER_API_PREFS_PREF_SERVICE_BASE_H_
17 #define CHROME_BROWSER_API_PREFS_PREF_SERVICE_BASE_H_ 17 #define CHROME_BROWSER_API_PREFS_PREF_SERVICE_BASE_H_
18 18
19 #include "base/values.h" 19 #include "base/values.h"
20 20
21 namespace content { 21 namespace content {
22 class BrowserContext;
22 class NotificationObserver; 23 class NotificationObserver;
23 } 24 }
24 25
25 namespace subtle { 26 namespace subtle {
26 class PrefMemberBase; 27 class PrefMemberBase;
27 } 28 }
28 29
29 class FilePath; 30 class FilePath;
30 class Profile; 31 class Profile;
31 class TabContents; 32 class TabContents;
32 33
33 class PrefServiceBase { 34 class PrefServiceBase {
34 public: 35 public:
35 // Retrieves a PrefServiceBase for the given profile. 36 // Retrieves a PrefServiceBase for the given context.
36 static PrefServiceBase* ForProfile(Profile* profile); 37 static PrefServiceBase* ForContext(content::BrowserContext* context);
37 38
38 virtual ~PrefServiceBase() {} 39 virtual ~PrefServiceBase() {}
39 40
40 // Enum used when registering preferences to determine if it should be synced 41 // Enum used when registering preferences to determine if it should be synced
41 // or not. This is only used for profile prefs, not local state prefs. 42 // or not. This is only used for profile prefs, not local state prefs.
42 // See the Register*Pref methods for profile prefs below. 43 // See the Register*Pref methods for profile prefs below.
43 enum PrefSyncStatus { 44 enum PrefSyncStatus {
44 UNSYNCABLE_PREF, 45 UNSYNCABLE_PREF,
45 SYNCABLE_PREF 46 SYNCABLE_PREF
46 }; 47 };
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // method with PREF_CHANGED. Note that observers should not call these methods 263 // method with PREF_CHANGED. Note that observers should not call these methods
263 // directly but rather use a PrefChangeRegistrar to make sure the observer 264 // directly but rather use a PrefChangeRegistrar to make sure the observer
264 // gets cleaned up properly. 265 // gets cleaned up properly.
265 virtual void AddPrefObserver(const char* path, 266 virtual void AddPrefObserver(const char* path,
266 content::NotificationObserver* obs) = 0; 267 content::NotificationObserver* obs) = 0;
267 virtual void RemovePrefObserver(const char* path, 268 virtual void RemovePrefObserver(const char* path,
268 content::NotificationObserver* obs) = 0; 269 content::NotificationObserver* obs) = 0;
269 }; 270 };
270 271
271 #endif // CHROME_BROWSER_API_PREFS_PREF_SERVICE_BASE_H_ 272 #endif // CHROME_BROWSER_API_PREFS_PREF_SERVICE_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/api/webdata/web_data_service_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698