OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // When each service is created, we set a flag indicating this. At this point, | 5 // When each service is created, we set a flag indicating this. At this point, |
6 // the service initialization could fail or succeed. This allows us to remember | 6 // the service initialization could fail or succeed. This allows us to remember |
7 // if we tried to create a service, and not try creating it over and over if | 7 // if we tried to create a service, and not try creating it over and over if |
8 // the creation failed. | 8 // the creation failed. |
9 | 9 |
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/download/download_status_updater.h" | 22 #include "chrome/browser/download/download_status_updater.h" |
23 #include "chrome/browser/prefs/pref_change_registrar.h" | 23 #include "chrome/browser/prefs/pref_change_registrar.h" |
24 #include "chrome/browser/prefs/pref_member.h" | 24 #include "chrome/browser/prefs/pref_member.h" |
25 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 25 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
26 #include "content/common/notification_observer.h" | 26 #include "content/common/notification_observer.h" |
27 #include "content/common/notification_registrar.h" | 27 #include "content/common/notification_registrar.h" |
28 #include "ipc/ipc_message.h" | 28 #include "ipc/ipc_message.h" |
29 | 29 |
30 class ChromeNetLog; | 30 class ChromeNetLog; |
| 31 class ChromeResourceDispatcherHostObserver; |
31 class CommandLine; | 32 class CommandLine; |
32 class DevToolsHttpProtocolHandler; | 33 class DevToolsHttpProtocolHandler; |
33 class DevToolsProtocolHandler; | 34 class DevToolsProtocolHandler; |
34 class FilePath; | 35 class FilePath; |
35 class NotificationService; | 36 class NotificationService; |
36 class PluginDataRemover; | 37 class PluginDataRemover; |
37 class TabCloseableStateWatcher; | 38 class TabCloseableStateWatcher; |
38 | 39 |
39 // Real implementation of BrowserProcess that creates and returns the services. | 40 // Real implementation of BrowserProcess that creates and returns the services. |
40 class BrowserProcessImpl : public BrowserProcess, | 41 class BrowserProcessImpl : public BrowserProcess, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 virtual void Observe(NotificationType type, | 105 virtual void Observe(NotificationType type, |
105 const NotificationSource& source, | 106 const NotificationSource& source, |
106 const NotificationDetails& details); | 107 const NotificationDetails& details); |
107 | 108 |
108 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 109 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
109 virtual void StartAutoupdateTimer(); | 110 virtual void StartAutoupdateTimer(); |
110 #endif | 111 #endif |
111 | 112 |
112 virtual ChromeNetLog* net_log(); | 113 virtual ChromeNetLog* net_log(); |
113 | 114 |
| 115 virtual prerender::PrerenderTracker* prerender_tracker(); |
| 116 |
114 #if defined(IPC_MESSAGE_LOG_ENABLED) | 117 #if defined(IPC_MESSAGE_LOG_ENABLED) |
115 virtual void SetIPCLoggingEnabled(bool enable); | 118 virtual void SetIPCLoggingEnabled(bool enable); |
116 #endif | 119 #endif |
117 | 120 |
118 private: | 121 private: |
119 void ClearLocalState(const FilePath& profile_path); | 122 void ClearLocalState(const FilePath& profile_path); |
120 bool ShouldClearLocalState(FilePath* profile_path); | 123 bool ShouldClearLocalState(FilePath* profile_path); |
121 | 124 |
122 void CreateResourceDispatcherHost(); | 125 void CreateResourceDispatcherHost(); |
123 void CreateMetricsService(); | 126 void CreateMetricsService(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // An event that notifies when we are shutting-down. | 272 // An event that notifies when we are shutting-down. |
270 scoped_ptr<base::WaitableEvent> shutdown_event_; | 273 scoped_ptr<base::WaitableEvent> shutdown_event_; |
271 | 274 |
272 // Ensures that the observers of plugin/print disable/enable state | 275 // Ensures that the observers of plugin/print disable/enable state |
273 // notifications are properly added and removed. | 276 // notifications are properly added and removed. |
274 PrefChangeRegistrar pref_change_registrar_; | 277 PrefChangeRegistrar pref_change_registrar_; |
275 | 278 |
276 // Lives here so can safely log events on shutdown. | 279 // Lives here so can safely log events on shutdown. |
277 scoped_ptr<ChromeNetLog> net_log_; | 280 scoped_ptr<ChromeNetLog> net_log_; |
278 | 281 |
| 282 // Ordered before resource_dispatcher_host_observer_ due to destruction |
| 283 // ordering. |
| 284 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
| 285 |
| 286 scoped_ptr<ChromeResourceDispatcherHostObserver> |
| 287 resource_dispatcher_host_observer_; |
| 288 |
279 NotificationRegistrar notification_registrar_; | 289 NotificationRegistrar notification_registrar_; |
280 scoped_refptr<PluginDataRemover> plugin_data_remover_; | 290 scoped_refptr<PluginDataRemover> plugin_data_remover_; |
281 | 291 |
282 // Monitors the state of the 'DisablePluginFinder' policy. | 292 // Monitors the state of the 'DisablePluginFinder' policy. |
283 BooleanPrefMember plugin_finder_disabled_pref_; | 293 BooleanPrefMember plugin_finder_disabled_pref_; |
284 | 294 |
285 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 295 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
286 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; | 296 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
287 | 297 |
288 // Gets called by autoupdate timer to see if browser needs restart and can be | 298 // Gets called by autoupdate timer to see if browser needs restart and can be |
289 // restarted, and if that's the case, restarts the browser. | 299 // restarted, and if that's the case, restarts the browser. |
290 void OnAutoupdateTimer(); | 300 void OnAutoupdateTimer(); |
291 bool CanAutorestartForUpdate() const; | 301 bool CanAutorestartForUpdate() const; |
292 void RestartPersistentInstance(); | 302 void RestartPersistentInstance(); |
293 #endif // defined(OS_WIN) || defined(OS_LINUX) | 303 #endif // defined(OS_WIN) || defined(OS_LINUX) |
294 | 304 |
295 #if defined(OS_CHROMEOS) | 305 #if defined(OS_CHROMEOS) |
296 scoped_refptr<chromeos::ProxyConfigServiceImpl> | 306 scoped_refptr<chromeos::ProxyConfigServiceImpl> |
297 chromeos_proxy_config_service_impl_; | 307 chromeos_proxy_config_service_impl_; |
298 #endif | 308 #endif |
299 | 309 |
300 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 310 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
301 }; | 311 }; |
302 | 312 |
303 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 313 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |