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/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/profiles/profile_impl_io_data.h" | 20 #include "chrome/browser/profiles/profile_impl_io_data.h" |
21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" | 21 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" |
| 22 #include "chrome/common/features.h" |
22 #include "components/prefs/pref_change_registrar.h" | 23 #include "components/prefs/pref_change_registrar.h" |
23 #include "content/public/browser/content_browser_client.h" | 24 #include "content/public/browser/content_browser_client.h" |
24 #include "content/public/browser/host_zoom_map.h" | 25 #include "content/public/browser/host_zoom_map.h" |
25 | 26 |
26 class PrefService; | 27 class PrefService; |
27 | 28 |
28 class TrackedPreferenceValidationDelegate; | 29 class TrackedPreferenceValidationDelegate; |
29 | 30 |
30 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
31 namespace chromeos { | 32 namespace chromeos { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 166 |
166 // Does final initialization. Should be called after prefs were loaded. | 167 // Does final initialization. Should be called after prefs were loaded. |
167 void DoFinalInit(); | 168 void DoFinalInit(); |
168 | 169 |
169 // Switch locale (when possible) and proceed to OnLocaleReady(). | 170 // Switch locale (when possible) and proceed to OnLocaleReady(). |
170 void OnPrefsLoaded(CreateMode create_mode, bool success); | 171 void OnPrefsLoaded(CreateMode create_mode, bool success); |
171 | 172 |
172 // Does final prefs initialization and calls Init(). | 173 // Does final prefs initialization and calls Init(). |
173 void OnLocaleReady(); | 174 void OnLocaleReady(); |
174 | 175 |
175 #if defined(ENABLE_SESSION_SERVICE) | 176 #if BUILDFLAG(ENABLE_SESSION_SERVICE) |
176 void StopCreateSessionServiceTimer(); | 177 void StopCreateSessionServiceTimer(); |
177 | 178 |
178 void EnsureSessionServiceCreated(); | 179 void EnsureSessionServiceCreated(); |
179 #endif | 180 #endif |
180 | 181 |
181 // Updates the ProfileAttributesStorage with the data from this profile. | 182 // Updates the ProfileAttributesStorage with the data from this profile. |
182 void UpdateSupervisedUserIdInStorage(); | 183 void UpdateSupervisedUserIdInStorage(); |
183 void UpdateNameInStorage(); | 184 void UpdateNameInStorage(); |
184 void UpdateAvatarInStorage(); | 185 void UpdateAvatarInStorage(); |
185 void UpdateIsEphemeralInStorage(); | 186 void UpdateIsEphemeralInStorage(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 scoped_refptr<ExtensionSpecialStoragePolicy> | 230 scoped_refptr<ExtensionSpecialStoragePolicy> |
230 extension_special_storage_policy_; | 231 extension_special_storage_policy_; |
231 #endif | 232 #endif |
232 std::unique_ptr<ssl_config::SSLConfigServiceManager> | 233 std::unique_ptr<ssl_config::SSLConfigServiceManager> |
233 ssl_config_service_manager_; | 234 ssl_config_service_manager_; |
234 | 235 |
235 // Exit type the last time the profile was opened. This is set only once from | 236 // Exit type the last time the profile was opened. This is set only once from |
236 // prefs. | 237 // prefs. |
237 ExitType last_session_exit_type_; | 238 ExitType last_session_exit_type_; |
238 | 239 |
239 #if defined(ENABLE_SESSION_SERVICE) | 240 #if BUILDFLAG(ENABLE_SESSION_SERVICE) |
240 base::OneShotTimer create_session_service_timer_; | 241 base::OneShotTimer create_session_service_timer_; |
241 #endif | 242 #endif |
242 | 243 |
243 std::unique_ptr<Profile> off_the_record_profile_; | 244 std::unique_ptr<Profile> off_the_record_profile_; |
244 | 245 |
245 // See GetStartTime for details. | 246 // See GetStartTime for details. |
246 base::Time start_time_; | 247 base::Time start_time_; |
247 | 248 |
248 #if defined(OS_CHROMEOS) | 249 #if defined(OS_CHROMEOS) |
249 std::unique_ptr<chromeos::Preferences> chromeos_preferences_; | 250 std::unique_ptr<chromeos::Preferences> chromeos_preferences_; |
(...skipping 18 matching lines...) Expand all Loading... |
268 // components/keyed_service/content/browser_context_keyed_service_factory.* | 269 // components/keyed_service/content/browser_context_keyed_service_factory.* |
269 | 270 |
270 Profile::Delegate* delegate_; | 271 Profile::Delegate* delegate_; |
271 | 272 |
272 chrome_browser_net::Predictor* predictor_; | 273 chrome_browser_net::Predictor* predictor_; |
273 | 274 |
274 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 275 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
275 }; | 276 }; |
276 | 277 |
277 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 278 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |