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> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 class ProfileImpl : public Profile { | 69 class ProfileImpl : public Profile { |
70 public: | 70 public: |
71 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. | 71 // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. |
72 static const char* const kPrefExitTypeNormal; | 72 static const char* const kPrefExitTypeNormal; |
73 | 73 |
74 ~ProfileImpl() override; | 74 ~ProfileImpl() override; |
75 | 75 |
76 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 76 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
77 | 77 |
78 // content::BrowserContext implementation: | 78 // content::BrowserContext implementation: |
| 79 scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( |
| 80 const base::FilePath& partition_path) override; |
79 base::FilePath GetPath() const override; | 81 base::FilePath GetPath() const override; |
80 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; | 82 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; |
81 net::URLRequestContextGetter* GetRequestContext() override; | 83 net::URLRequestContextGetter* GetRequestContext() override; |
82 net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 84 net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
83 int renderer_child_id) override; | 85 int renderer_child_id) override; |
84 net::URLRequestContextGetter* GetMediaRequestContext() override; | 86 net::URLRequestContextGetter* GetMediaRequestContext() override; |
85 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 87 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
86 int renderer_child_id) override; | 88 int renderer_child_id) override; |
87 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( | 89 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( |
88 const base::FilePath& partition_path, | 90 const base::FilePath& partition_path, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 static int create_readme_delay_ms; | 164 static int create_readme_delay_ms; |
163 | 165 |
164 ProfileImpl(const base::FilePath& path, | 166 ProfileImpl(const base::FilePath& path, |
165 Delegate* delegate, | 167 Delegate* delegate, |
166 CreateMode create_mode, | 168 CreateMode create_mode, |
167 base::SequencedTaskRunner* sequenced_task_runner); | 169 base::SequencedTaskRunner* sequenced_task_runner); |
168 | 170 |
169 // Does final initialization. Should be called after prefs were loaded. | 171 // Does final initialization. Should be called after prefs were loaded. |
170 void DoFinalInit(); | 172 void DoFinalInit(); |
171 | 173 |
172 // TODO(wjmaclean): Delete this once the HostZoomMap moves to | |
173 // StoragePartition. | |
174 void InitHostZoomMap(); | |
175 | |
176 // Does final prefs initialization and calls Init(). | 174 // Does final prefs initialization and calls Init(). |
177 void OnPrefsLoaded(bool success); | 175 void OnPrefsLoaded(bool success); |
178 | 176 |
179 #if defined(ENABLE_SESSION_SERVICE) | 177 #if defined(ENABLE_SESSION_SERVICE) |
180 void StopCreateSessionServiceTimer(); | 178 void StopCreateSessionServiceTimer(); |
181 | 179 |
182 void EnsureSessionServiceCreated(); | 180 void EnsureSessionServiceCreated(); |
183 #endif | 181 #endif |
184 | 182 |
185 | 183 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives | 226 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives |
229 // the latter. | 227 // the latter. |
230 scoped_ptr<TrackedPreferenceValidationDelegate> pref_validation_delegate_; | 228 scoped_ptr<TrackedPreferenceValidationDelegate> pref_validation_delegate_; |
231 | 229 |
232 // Keep |prefs_| on top for destruction order because |extension_prefs_|, | 230 // Keep |prefs_| on top for destruction order because |extension_prefs_|, |
233 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and | 231 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and |
234 // shall be destructed first. | 232 // shall be destructed first. |
235 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; | 233 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; |
236 scoped_ptr<PrefServiceSyncable> prefs_; | 234 scoped_ptr<PrefServiceSyncable> prefs_; |
237 scoped_ptr<PrefServiceSyncable> otr_prefs_; | 235 scoped_ptr<PrefServiceSyncable> otr_prefs_; |
238 // TODO(wjmaclean): This is only here temporarily until HostZoomMap moves | |
239 // into StoragePartition, after which it will also move to StoragePartition. | |
240 // Must declare this here so it is destroyed before the profile prefs service. | |
241 scoped_ptr<chrome::ChromeZoomLevelPrefs> zoom_level_prefs_; | |
242 ProfileImplIOData::Handle io_data_; | 236 ProfileImplIOData::Handle io_data_; |
243 #if defined(ENABLE_EXTENSIONS) | 237 #if defined(ENABLE_EXTENSIONS) |
244 scoped_refptr<ExtensionSpecialStoragePolicy> | 238 scoped_refptr<ExtensionSpecialStoragePolicy> |
245 extension_special_storage_policy_; | 239 extension_special_storage_policy_; |
246 #endif | 240 #endif |
247 scoped_ptr<NetPrefObserver> net_pref_observer_; | 241 scoped_ptr<NetPrefObserver> net_pref_observer_; |
248 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; | 242 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
249 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 243 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
250 scoped_refptr<ShortcutsBackend> shortcuts_backend_; | 244 scoped_refptr<ShortcutsBackend> shortcuts_backend_; |
251 | 245 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // components/keyed_service/content/browser_context_keyed_service_factory.* | 283 // components/keyed_service/content/browser_context_keyed_service_factory.* |
290 | 284 |
291 Profile::Delegate* delegate_; | 285 Profile::Delegate* delegate_; |
292 | 286 |
293 chrome_browser_net::Predictor* predictor_; | 287 chrome_browser_net::Predictor* predictor_; |
294 | 288 |
295 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 289 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
296 }; | 290 }; |
297 | 291 |
298 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 292 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |