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

Side by Side Diff: chrome/browser/profiles/profile_impl.h

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 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 | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl.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 // This class gathers state related to a single user profile. 5 // This class gathers state related to a single user profile.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/prefs/public/pref_change_registrar.h" 16 #include "base/prefs/public/pref_change_registrar.h"
17 #include "base/timer.h" 17 #include "base/timer.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_impl_io_data.h" 19 #include "chrome/browser/profiles/profile_impl_io_data.h"
20 #include "content/public/browser/host_zoom_map.h" 20 #include "content/public/browser/host_zoom_map.h"
21 21
22 class NetPrefObserver; 22 class NetPrefObserver;
23 class PrefRegistrySyncable;
24 class PrefService;
25 class PrefServiceBase;
23 class PrefServiceSyncable; 26 class PrefServiceSyncable;
24 class PrefServiceBase;
25 class SSLConfigServiceManager; 27 class SSLConfigServiceManager;
26 28
27 #if defined(OS_CHROMEOS) 29 #if defined(OS_CHROMEOS)
28 namespace chromeos { 30 namespace chromeos {
29 class EnterpriseExtensionObserver; 31 class EnterpriseExtensionObserver;
30 class LocaleChangeGuard; 32 class LocaleChangeGuard;
31 class Preferences; 33 class Preferences;
32 } 34 }
33 #endif 35 #endif
34 36
(...skipping 14 matching lines...) Expand all
49 } 51 }
50 52
51 // The default profile implementation. 53 // The default profile implementation.
52 class ProfileImpl : public Profile { 54 class ProfileImpl : public Profile {
53 public: 55 public:
54 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. 56 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests.
55 static const char* const kPrefExitTypeNormal; 57 static const char* const kPrefExitTypeNormal;
56 58
57 virtual ~ProfileImpl(); 59 virtual ~ProfileImpl();
58 60
59 static void RegisterUserPrefs(PrefServiceSyncable* prefs); 61 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
60 62
61 // content::BrowserContext implementation: 63 // content::BrowserContext implementation:
62 virtual base::FilePath GetPath() OVERRIDE; 64 virtual base::FilePath GetPath() OVERRIDE;
63 virtual content::DownloadManagerDelegate* 65 virtual content::DownloadManagerDelegate*
64 GetDownloadManagerDelegate() OVERRIDE; 66 GetDownloadManagerDelegate() OVERRIDE;
65 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; 67 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
66 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 68 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
67 int renderer_child_id) OVERRIDE; 69 int renderer_child_id) OVERRIDE;
68 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 70 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
69 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 71 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
(...skipping 18 matching lines...) Expand all
88 virtual bool HasOffTheRecordProfile() OVERRIDE; 90 virtual bool HasOffTheRecordProfile() OVERRIDE;
89 virtual Profile* GetOriginalProfile() OVERRIDE; 91 virtual Profile* GetOriginalProfile() OVERRIDE;
90 virtual history::TopSites* GetTopSites() OVERRIDE; 92 virtual history::TopSites* GetTopSites() OVERRIDE;
91 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; 93 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE;
92 virtual ExtensionService* GetExtensionService() OVERRIDE; 94 virtual ExtensionService* GetExtensionService() OVERRIDE;
93 virtual ExtensionSpecialStoragePolicy* 95 virtual ExtensionSpecialStoragePolicy*
94 GetExtensionSpecialStoragePolicy() OVERRIDE; 96 GetExtensionSpecialStoragePolicy() OVERRIDE;
95 virtual policy::ManagedModePolicyProvider* 97 virtual policy::ManagedModePolicyProvider*
96 GetManagedModePolicyProvider() OVERRIDE; 98 GetManagedModePolicyProvider() OVERRIDE;
97 virtual policy::PolicyService* GetPolicyService() OVERRIDE; 99 virtual policy::PolicyService* GetPolicyService() OVERRIDE;
98 virtual PrefServiceSyncable* GetPrefs() OVERRIDE; 100 virtual PrefService* GetPrefs() OVERRIDE;
99 virtual PrefServiceSyncable* GetOffTheRecordPrefs() OVERRIDE; 101 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
100 virtual net::URLRequestContextGetter* 102 virtual net::URLRequestContextGetter*
101 GetRequestContextForExtensions() OVERRIDE; 103 GetRequestContextForExtensions() OVERRIDE;
102 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; 104 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE;
103 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; 105 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE;
104 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; 106 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE;
105 virtual bool IsSameProfile(Profile* profile) OVERRIDE; 107 virtual bool IsSameProfile(Profile* profile) OVERRIDE;
106 virtual base::Time GetStartTime() const OVERRIDE; 108 virtual base::Time GetStartTime() const OVERRIDE;
107 virtual net::URLRequestContextGetter* CreateRequestContext( 109 virtual net::URLRequestContextGetter* CreateRequestContext(
108 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 110 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
109 blob_protocol_handler, 111 blob_protocol_handler,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 #if !defined(OS_CHROMEOS) 226 #if !defined(OS_CHROMEOS)
225 scoped_ptr<policy::UserCloudPolicyManager> cloud_policy_manager_; 227 scoped_ptr<policy::UserCloudPolicyManager> cloud_policy_manager_;
226 #endif 228 #endif
227 scoped_ptr<policy::ManagedModePolicyProvider> managed_mode_policy_provider_; 229 scoped_ptr<policy::ManagedModePolicyProvider> managed_mode_policy_provider_;
228 #endif 230 #endif
229 scoped_ptr<policy::PolicyService> policy_service_; 231 scoped_ptr<policy::PolicyService> policy_service_;
230 232
231 // Keep |prefs_| on top for destruction order because |extension_prefs_|, 233 // Keep |prefs_| on top for destruction order because |extension_prefs_|,
232 // |net_pref_observer_|, |io_data_| an others store pointers to |prefs_| and 234 // |net_pref_observer_|, |io_data_| an others store pointers to |prefs_| and
233 // shall be destructed first. 235 // shall be destructed first.
236 scoped_refptr<PrefRegistrySyncable> pref_registry_;
234 scoped_ptr<PrefServiceSyncable> prefs_; 237 scoped_ptr<PrefServiceSyncable> prefs_;
235 scoped_ptr<PrefServiceSyncable> otr_prefs_; 238 scoped_ptr<PrefServiceSyncable> otr_prefs_;
236 ProfileImplIOData::Handle io_data_; 239 ProfileImplIOData::Handle io_data_;
237 scoped_refptr<ExtensionSpecialStoragePolicy> 240 scoped_refptr<ExtensionSpecialStoragePolicy>
238 extension_special_storage_policy_; 241 extension_special_storage_policy_;
239 scoped_ptr<NetPrefObserver> net_pref_observer_; 242 scoped_ptr<NetPrefObserver> net_pref_observer_;
240 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 243 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
241 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 244 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
242 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; 245 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_;
243 246
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc} 285 // chrome/browser/profile/profile_keyed_dependency_manager.{h,cc}
283 286
284 Profile::Delegate* delegate_; 287 Profile::Delegate* delegate_;
285 288
286 chrome_browser_net::Predictor* predictor_; 289 chrome_browser_net::Predictor* predictor_;
287 290
288 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 291 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
289 }; 292 };
290 293
291 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 294 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698