OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 9 #pragma once |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/prefs/pref_change_registrar.h" | 16 #include "chrome/browser/prefs/pref_change_registrar.h" |
17 #include "chrome/browser/spellcheck_host_observer.h" | 17 #include "chrome/browser/spellcheck_host_observer.h" |
18 #include "chrome/common/notification_observer.h" | 18 #include "chrome/common/notification_observer.h" |
19 #include "chrome/common/notification_registrar.h" | 19 #include "chrome/common/notification_registrar.h" |
20 | 20 |
| 21 class ExtensionPrefs; |
21 class PrefService; | 22 class PrefService; |
22 | 23 |
23 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
24 namespace chromeos { | 25 namespace chromeos { |
25 class Preferences; | 26 class Preferences; |
26 } | 27 } |
27 #endif | 28 #endif |
28 | 29 |
29 class NetPrefObserver; | 30 class NetPrefObserver; |
30 | 31 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 163 } |
163 | 164 |
164 void RegisterComponentExtensions(); | 165 void RegisterComponentExtensions(); |
165 void InstallDefaultApps(); | 166 void InstallDefaultApps(); |
166 | 167 |
167 NotificationRegistrar registrar_; | 168 NotificationRegistrar registrar_; |
168 PrefChangeRegistrar pref_change_registrar_; | 169 PrefChangeRegistrar pref_change_registrar_; |
169 | 170 |
170 FilePath path_; | 171 FilePath path_; |
171 FilePath base_cache_path_; | 172 FilePath base_cache_path_; |
| 173 // Keep prefs_ on top for destruction order because extension_prefs_, |
| 174 // net_pref_observer_, web_resource_service_ and background_contents_service_ |
| 175 // store pointers to prefs_ and shall be destructed first. |
| 176 scoped_ptr<PrefService> prefs_; |
172 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; | 177 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; |
173 scoped_ptr<VisitedLinkMaster> visited_link_master_; | 178 scoped_ptr<VisitedLinkMaster> visited_link_master_; |
| 179 // Keep extension_prefs_ on top of extensions_service_ because the latter |
| 180 // maintains a pointer to the first and shall be destructed first. |
| 181 scoped_ptr<ExtensionPrefs> extension_prefs_; |
174 scoped_refptr<ExtensionsService> extensions_service_; | 182 scoped_refptr<ExtensionsService> extensions_service_; |
175 scoped_refptr<UserScriptMaster> user_script_master_; | 183 scoped_refptr<UserScriptMaster> user_script_master_; |
176 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; | 184 scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; |
177 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 185 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
178 scoped_refptr<ExtensionMessageService> extension_message_service_; | 186 scoped_refptr<ExtensionMessageService> extension_message_service_; |
179 scoped_ptr<ExtensionEventRouter> extension_event_router_; | 187 scoped_ptr<ExtensionEventRouter> extension_event_router_; |
180 scoped_ptr<SSLHostState> ssl_host_state_; | 188 scoped_ptr<SSLHostState> ssl_host_state_; |
181 scoped_refptr<net::TransportSecurityState> | 189 scoped_refptr<net::TransportSecurityState> |
182 transport_security_state_; | 190 transport_security_state_; |
183 scoped_refptr<TransportSecurityPersister> | 191 scoped_refptr<TransportSecurityPersister> |
184 transport_security_persister_; | 192 transport_security_persister_; |
185 scoped_ptr<policy::ProfilePolicyContext> profile_policy_context_; | 193 scoped_ptr<policy::ProfilePolicyContext> profile_policy_context_; |
186 scoped_ptr<PrefService> prefs_; | |
187 scoped_ptr<NetPrefObserver> net_pref_observer_; | 194 scoped_ptr<NetPrefObserver> net_pref_observer_; |
188 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 195 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
189 scoped_ptr<TemplateURLModel> template_url_model_; | 196 scoped_ptr<TemplateURLModel> template_url_model_; |
190 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 197 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
191 scoped_refptr<WebResourceService> web_resource_service_; | 198 scoped_refptr<WebResourceService> web_resource_service_; |
192 scoped_ptr<NTPResourceCache> ntp_resource_cache_; | 199 scoped_ptr<NTPResourceCache> ntp_resource_cache_; |
193 | 200 |
194 scoped_ptr<TokenService> token_service_; | 201 scoped_ptr<TokenService> token_service_; |
195 scoped_ptr<ProfileSyncFactory> profile_sync_factory_; | 202 scoped_ptr<ProfileSyncFactory> profile_sync_factory_; |
196 scoped_ptr<ProfileSyncService> sync_service_; | 203 scoped_ptr<ProfileSyncService> sync_service_; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 scoped_ptr<chromeos::EnterpriseExtensionObserver> | 293 scoped_ptr<chromeos::EnterpriseExtensionObserver> |
287 chromeos_enterprise_extension_observer_; | 294 chromeos_enterprise_extension_observer_; |
288 #endif | 295 #endif |
289 | 296 |
290 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 297 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
291 | 298 |
292 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); | 299 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); |
293 }; | 300 }; |
294 | 301 |
295 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ | 302 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ |
OLD | NEW |