Chromium Code Reviews| 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 18 matching lines...) Expand all Loading... | |
| 29 | 29 |
| 30 class ChromeNetLog; | 30 class ChromeNetLog; |
| 31 class CommandLine; | 31 class CommandLine; |
| 32 class DevToolsHttpProtocolHandler; | 32 class DevToolsHttpProtocolHandler; |
| 33 class DevToolsProtocolHandler; | 33 class DevToolsProtocolHandler; |
| 34 class FilePath; | 34 class FilePath; |
| 35 class NotificationService; | 35 class NotificationService; |
| 36 class PluginDataRemover; | 36 class PluginDataRemover; |
| 37 class TabCloseableStateWatcher; | 37 class TabCloseableStateWatcher; |
| 38 | 38 |
| 39 namespace prerender { | |
|
mmenke
2011/05/23 22:51:02
nit: Not needed, since browser_process.h does thi
dominich
2011/05/24 15:10:28
Done.
| |
| 40 class PrerenderTracker; | |
| 41 } | |
| 42 | |
| 39 // Real implementation of BrowserProcess that creates and returns the services. | 43 // Real implementation of BrowserProcess that creates and returns the services. |
| 40 class BrowserProcessImpl : public BrowserProcess, | 44 class BrowserProcessImpl : public BrowserProcess, |
| 41 public base::NonThreadSafe, | 45 public base::NonThreadSafe, |
| 42 public NotificationObserver { | 46 public NotificationObserver { |
| 43 public: | 47 public: |
| 44 explicit BrowserProcessImpl(const CommandLine& command_line); | 48 explicit BrowserProcessImpl(const CommandLine& command_line); |
| 45 virtual ~BrowserProcessImpl(); | 49 virtual ~BrowserProcessImpl(); |
| 46 | 50 |
| 47 virtual void EndSession(); | 51 virtual void EndSession(); |
| 48 | 52 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 virtual void Observe(NotificationType type, | 108 virtual void Observe(NotificationType type, |
| 105 const NotificationSource& source, | 109 const NotificationSource& source, |
| 106 const NotificationDetails& details); | 110 const NotificationDetails& details); |
| 107 | 111 |
| 108 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 112 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 109 virtual void StartAutoupdateTimer(); | 113 virtual void StartAutoupdateTimer(); |
| 110 #endif | 114 #endif |
| 111 | 115 |
| 112 virtual ChromeNetLog* net_log(); | 116 virtual ChromeNetLog* net_log(); |
| 113 | 117 |
| 118 virtual prerender::PrerenderTracker* prerender_tracker(); | |
| 119 | |
| 114 #if defined(IPC_MESSAGE_LOG_ENABLED) | 120 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 115 virtual void SetIPCLoggingEnabled(bool enable); | 121 virtual void SetIPCLoggingEnabled(bool enable); |
| 116 #endif | 122 #endif |
| 117 | 123 |
| 118 private: | 124 private: |
| 119 void ClearLocalState(const FilePath& profile_path); | 125 void ClearLocalState(const FilePath& profile_path); |
| 120 bool ShouldClearLocalState(FilePath* profile_path); | 126 bool ShouldClearLocalState(FilePath* profile_path); |
| 121 | 127 |
| 122 void CreateResourceDispatcherHost(); | 128 void CreateResourceDispatcherHost(); |
| 123 void CreateMetricsService(); | 129 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. | 275 // An event that notifies when we are shutting-down. |
| 270 scoped_ptr<base::WaitableEvent> shutdown_event_; | 276 scoped_ptr<base::WaitableEvent> shutdown_event_; |
| 271 | 277 |
| 272 // Ensures that the observers of plugin/print disable/enable state | 278 // Ensures that the observers of plugin/print disable/enable state |
| 273 // notifications are properly added and removed. | 279 // notifications are properly added and removed. |
| 274 PrefChangeRegistrar pref_change_registrar_; | 280 PrefChangeRegistrar pref_change_registrar_; |
| 275 | 281 |
| 276 // Lives here so can safely log events on shutdown. | 282 // Lives here so can safely log events on shutdown. |
| 277 scoped_ptr<ChromeNetLog> net_log_; | 283 scoped_ptr<ChromeNetLog> net_log_; |
| 278 | 284 |
| 285 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; | |
| 286 | |
| 279 NotificationRegistrar notification_registrar_; | 287 NotificationRegistrar notification_registrar_; |
| 280 scoped_refptr<PluginDataRemover> plugin_data_remover_; | 288 scoped_refptr<PluginDataRemover> plugin_data_remover_; |
| 281 | 289 |
| 282 // Monitors the state of the 'DisablePluginFinder' policy. | 290 // Monitors the state of the 'DisablePluginFinder' policy. |
| 283 BooleanPrefMember plugin_finder_disabled_pref_; | 291 BooleanPrefMember plugin_finder_disabled_pref_; |
| 284 | 292 |
| 285 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 293 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 286 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; | 294 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
| 287 | 295 |
| 288 // Gets called by autoupdate timer to see if browser needs restart and can be | 296 // 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. | 297 // restarted, and if that's the case, restarts the browser. |
| 290 void OnAutoupdateTimer(); | 298 void OnAutoupdateTimer(); |
| 291 bool CanAutorestartForUpdate() const; | 299 bool CanAutorestartForUpdate() const; |
| 292 void RestartPersistentInstance(); | 300 void RestartPersistentInstance(); |
| 293 #endif // defined(OS_WIN) || defined(OS_LINUX) | 301 #endif // defined(OS_WIN) || defined(OS_LINUX) |
| 294 | 302 |
| 295 #if defined(OS_CHROMEOS) | 303 #if defined(OS_CHROMEOS) |
| 296 scoped_refptr<chromeos::ProxyConfigServiceImpl> | 304 scoped_refptr<chromeos::ProxyConfigServiceImpl> |
| 297 chromeos_proxy_config_service_impl_; | 305 chromeos_proxy_config_service_impl_; |
| 298 #endif | 306 #endif |
| 299 | 307 |
| 300 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 308 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
| 301 }; | 309 }; |
| 302 | 310 |
| 303 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 311 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| OLD | NEW |