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 // 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/files/file_path.h" | 12 #include "base/files/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/pref_change_registrar.h" | 16 #include "base/prefs/pref_change_registrar.h" |
17 #include "base/timer/timer.h" | 17 #include "base/timer/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 "components/domain_reliability/clear_mode.h" | 20 #include "components/domain_reliability/clear_mode.h" |
21 #include "content/public/browser/content_browser_client.h" | 21 #include "content/public/browser/content_browser_client.h" |
22 #include "content/public/browser/host_zoom_map.h" | 22 #include "content/public/browser/host_zoom_map.h" |
23 | 23 |
24 class NetPrefObserver; | 24 class NetPrefObserver; |
25 class PrefService; | 25 class PrefService; |
26 class PrefServiceSyncable; | 26 class PrefServiceSyncable; |
27 class ShortcutsBackend; | 27 class ShortcutsBackend; |
28 class SSLConfigServiceManager; | 28 class SSLConfigServiceManager; |
| 29 class TrackedPreferenceValidationDelegate; |
29 | 30 |
30 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
31 namespace chromeos { | 32 namespace chromeos { |
32 class KioskTest; | 33 class KioskTest; |
33 class LocaleChangeGuard; | 34 class LocaleChangeGuard; |
34 class ManagedUserTestBase; | 35 class ManagedUserTestBase; |
35 class Preferences; | 36 class Preferences; |
36 } | 37 } |
37 #endif | 38 #endif |
38 | 39 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // PolicyService that the |prefs_| depend on, and must outlive |prefs_|. | 236 // PolicyService that the |prefs_| depend on, and must outlive |prefs_|. |
236 // This can be removed once |prefs_| becomes a KeyedService too. | 237 // This can be removed once |prefs_| becomes a KeyedService too. |
237 // |profile_policy_connector_| in turn depends on |cloud_policy_manager_|, | 238 // |profile_policy_connector_| in turn depends on |cloud_policy_manager_|, |
238 // which depends on |schema_registry_service_|. | 239 // which depends on |schema_registry_service_|. |
239 #if defined(ENABLE_CONFIGURATION_POLICY) | 240 #if defined(ENABLE_CONFIGURATION_POLICY) |
240 scoped_ptr<policy::SchemaRegistryService> schema_registry_service_; | 241 scoped_ptr<policy::SchemaRegistryService> schema_registry_service_; |
241 scoped_ptr<policy::CloudPolicyManager> cloud_policy_manager_; | 242 scoped_ptr<policy::CloudPolicyManager> cloud_policy_manager_; |
242 #endif | 243 #endif |
243 scoped_ptr<policy::ProfilePolicyConnector> profile_policy_connector_; | 244 scoped_ptr<policy::ProfilePolicyConnector> profile_policy_connector_; |
244 | 245 |
| 246 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives |
| 247 // the latter. |
| 248 scoped_ptr<TrackedPreferenceValidationDelegate> pref_validation_delegate_; |
| 249 |
245 // Keep |prefs_| on top for destruction order because |extension_prefs_|, | 250 // Keep |prefs_| on top for destruction order because |extension_prefs_|, |
246 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and | 251 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and |
247 // shall be destructed first. | 252 // shall be destructed first. |
248 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; | 253 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; |
249 scoped_ptr<PrefServiceSyncable> prefs_; | 254 scoped_ptr<PrefServiceSyncable> prefs_; |
250 scoped_ptr<PrefServiceSyncable> otr_prefs_; | 255 scoped_ptr<PrefServiceSyncable> otr_prefs_; |
251 ProfileImplIOData::Handle io_data_; | 256 ProfileImplIOData::Handle io_data_; |
252 scoped_refptr<ExtensionSpecialStoragePolicy> | 257 scoped_refptr<ExtensionSpecialStoragePolicy> |
253 extension_special_storage_policy_; | 258 extension_special_storage_policy_; |
254 scoped_ptr<NetPrefObserver> net_pref_observer_; | 259 scoped_ptr<NetPrefObserver> net_pref_observer_; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // components/keyed_service/content/browser_context_keyed_service_factory.* | 301 // components/keyed_service/content/browser_context_keyed_service_factory.* |
297 | 302 |
298 Profile::Delegate* delegate_; | 303 Profile::Delegate* delegate_; |
299 | 304 |
300 chrome_browser_net::Predictor* predictor_; | 305 chrome_browser_net::Predictor* predictor_; |
301 | 306 |
302 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 307 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
303 }; | 308 }; |
304 | 309 |
305 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 310 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |