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 <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "chrome/browser/net/net_pref_observer.h" |
19 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/profiles/profile_impl_io_data.h" | 21 #include "chrome/browser/profiles/profile_impl_io_data.h" |
21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" | 22 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
22 #include "chrome/common/features.h" | 23 #include "chrome/common/features.h" |
23 #include "components/prefs/pref_change_registrar.h" | 24 #include "components/prefs/pref_change_registrar.h" |
24 #include "content/public/browser/content_browser_client.h" | 25 #include "content/public/browser/content_browser_client.h" |
25 #include "content/public/browser/host_zoom_map.h" | 26 #include "content/public/browser/host_zoom_map.h" |
26 #include "extensions/features/features.h" | 27 #include "extensions/features/features.h" |
27 | 28 |
28 class PrefService; | 29 class PrefService; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 std::unique_ptr<policy::SchemaRegistryService> schema_registry_service_; | 211 std::unique_ptr<policy::SchemaRegistryService> schema_registry_service_; |
211 std::unique_ptr<policy::CloudPolicyManager> cloud_policy_manager_; | 212 std::unique_ptr<policy::CloudPolicyManager> cloud_policy_manager_; |
212 std::unique_ptr<policy::ProfilePolicyConnector> profile_policy_connector_; | 213 std::unique_ptr<policy::ProfilePolicyConnector> profile_policy_connector_; |
213 | 214 |
214 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives | 215 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives |
215 // the latter. | 216 // the latter. |
216 std::unique_ptr<TrackedPreferenceValidationDelegate> | 217 std::unique_ptr<TrackedPreferenceValidationDelegate> |
217 pref_validation_delegate_; | 218 pref_validation_delegate_; |
218 | 219 |
219 // Keep |prefs_| on top for destruction order because |extension_prefs_|, | 220 // Keep |prefs_| on top for destruction order because |extension_prefs_|, |
220 // |io_data_| and others store pointers to |prefs_| and shall be destructed | 221 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and |
221 // first. | 222 // shall be destructed first. |
222 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; | 223 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; |
223 std::unique_ptr<sync_preferences::PrefServiceSyncable> prefs_; | 224 std::unique_ptr<sync_preferences::PrefServiceSyncable> prefs_; |
224 std::unique_ptr<sync_preferences::PrefServiceSyncable> otr_prefs_; | 225 std::unique_ptr<sync_preferences::PrefServiceSyncable> otr_prefs_; |
225 ProfileImplIOData::Handle io_data_; | 226 ProfileImplIOData::Handle io_data_; |
226 #if BUILDFLAG(ENABLE_EXTENSIONS) | 227 #if BUILDFLAG(ENABLE_EXTENSIONS) |
227 scoped_refptr<ExtensionSpecialStoragePolicy> | 228 scoped_refptr<ExtensionSpecialStoragePolicy> |
228 extension_special_storage_policy_; | 229 extension_special_storage_policy_; |
229 #endif | 230 #endif |
| 231 std::unique_ptr<NetPrefObserver> net_pref_observer_; |
230 std::unique_ptr<ssl_config::SSLConfigServiceManager> | 232 std::unique_ptr<ssl_config::SSLConfigServiceManager> |
231 ssl_config_service_manager_; | 233 ssl_config_service_manager_; |
232 | 234 |
233 // Exit type the last time the profile was opened. This is set only once from | 235 // Exit type the last time the profile was opened. This is set only once from |
234 // prefs. | 236 // prefs. |
235 ExitType last_session_exit_type_; | 237 ExitType last_session_exit_type_; |
236 | 238 |
237 #if BUILDFLAG(ENABLE_SESSION_SERVICE) | 239 #if BUILDFLAG(ENABLE_SESSION_SERVICE) |
238 base::OneShotTimer create_session_service_timer_; | 240 base::OneShotTimer create_session_service_timer_; |
239 #endif | 241 #endif |
(...skipping 26 matching lines...) Expand all Loading... |
266 // components/keyed_service/content/browser_context_keyed_service_factory.* | 268 // components/keyed_service/content/browser_context_keyed_service_factory.* |
267 | 269 |
268 Profile::Delegate* delegate_; | 270 Profile::Delegate* delegate_; |
269 | 271 |
270 chrome_browser_net::Predictor* predictor_; | 272 chrome_browser_net::Predictor* predictor_; |
271 | 273 |
272 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 274 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
273 }; | 275 }; |
274 | 276 |
275 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 277 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |