| 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 // 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 class ChromeNetLog; | 26 class ChromeNetLog; |
| 27 class ChromeResourceDispatcherHostDelegate; | 27 class ChromeResourceDispatcherHostDelegate; |
| 28 class CommandLine; | 28 class CommandLine; |
| 29 class RemoteDebuggingServer; | 29 class RemoteDebuggingServer; |
| 30 | 30 |
| 31 #if defined(ENABLE_PLUGIN_INSTALLATION) | 31 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 32 class PluginsResourceService; | 32 class PluginsResourceService; |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 namespace base { |
| 36 class SequencedTaskRunner; |
| 37 } |
| 38 |
| 35 namespace policy { | 39 namespace policy { |
| 36 class BrowserPolicyConnector; | 40 class BrowserPolicyConnector; |
| 37 class PolicyService; | 41 class PolicyService; |
| 38 }; | 42 }; |
| 39 | 43 |
| 40 // Real implementation of BrowserProcess that creates and returns the services. | 44 // Real implementation of BrowserProcess that creates and returns the services. |
| 41 class BrowserProcessImpl : public BrowserProcess, | 45 class BrowserProcessImpl : public BrowserProcess, |
| 42 public base::NonThreadSafe, | 46 public base::NonThreadSafe, |
| 43 public content::NotificationObserver { | 47 public content::NotificationObserver { |
| 44 public: | 48 public: |
| 45 explicit BrowserProcessImpl(const CommandLine& command_line); | 49 // |local_state_task_runner| must be a shutdown-blocking task runner. |
| 50 BrowserProcessImpl( |
| 51 base::SequencedTaskRunner* local_state_task_runner, |
| 52 const CommandLine& command_line); |
| 46 virtual ~BrowserProcessImpl(); | 53 virtual ~BrowserProcessImpl(); |
| 47 | 54 |
| 48 // Called before the browser threads are created. | 55 // Called before the browser threads are created. |
| 49 void PreCreateThreads(); | 56 void PreCreateThreads(); |
| 50 | 57 |
| 51 // Called after the threads have been created but before the message loops | 58 // Called after the threads have been created but before the message loops |
| 52 // starts running. Allows the browser process to do any initialization that | 59 // starts running. Allows the browser process to do any initialization that |
| 53 // requires all threads running. | 60 // requires all threads running. |
| 54 void PreMainMessageLoopRun(); | 61 void PreMainMessageLoopRun(); |
| 55 | 62 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // nothing in the constructor so we don't have to worry about lazy init. | 225 // nothing in the constructor so we don't have to worry about lazy init. |
| 219 scoped_ptr<RenderWidgetSnapshotTaker> render_widget_snapshot_taker_; | 226 scoped_ptr<RenderWidgetSnapshotTaker> render_widget_snapshot_taker_; |
| 220 | 227 |
| 221 // Download status updates (like a changing application icon on dock/taskbar) | 228 // Download status updates (like a changing application icon on dock/taskbar) |
| 222 // are global per-application. DownloadStatusUpdater does no work in the ctor | 229 // are global per-application. DownloadStatusUpdater does no work in the ctor |
| 223 // so we don't have to worry about lazy initialization. | 230 // so we don't have to worry about lazy initialization. |
| 224 scoped_ptr<DownloadStatusUpdater> download_status_updater_; | 231 scoped_ptr<DownloadStatusUpdater> download_status_updater_; |
| 225 | 232 |
| 226 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; | 233 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
| 227 | 234 |
| 235 // Sequenced task runner for local state related I/O tasks. |
| 236 const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_; |
| 237 |
| 228 // Ensures that the observers of plugin/print disable/enable state | 238 // Ensures that the observers of plugin/print disable/enable state |
| 229 // notifications are properly added and removed. | 239 // notifications are properly added and removed. |
| 230 PrefChangeRegistrar pref_change_registrar_; | 240 PrefChangeRegistrar pref_change_registrar_; |
| 231 | 241 |
| 232 // Lives here so can safely log events on shutdown. | 242 // Lives here so can safely log events on shutdown. |
| 233 scoped_ptr<ChromeNetLog> net_log_; | 243 scoped_ptr<ChromeNetLog> net_log_; |
| 234 | 244 |
| 235 // Ordered before resource_dispatcher_host_delegate_ due to destruction | 245 // Ordered before resource_dispatcher_host_delegate_ due to destruction |
| 236 // ordering. | 246 // ordering. |
| 237 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; | 247 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 264 scoped_refptr<PluginsResourceService> plugins_resource_service_; | 274 scoped_refptr<PluginsResourceService> plugins_resource_service_; |
| 265 #endif | 275 #endif |
| 266 // TODO(eroman): Remove this when done debugging 113031. This tracks | 276 // TODO(eroman): Remove this when done debugging 113031. This tracks |
| 267 // the callstack which released the final module reference count. | 277 // the callstack which released the final module reference count. |
| 268 base::debug::StackTrace release_last_reference_callstack_; | 278 base::debug::StackTrace release_last_reference_callstack_; |
| 269 | 279 |
| 270 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 280 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
| 271 }; | 281 }; |
| 272 | 282 |
| 273 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 283 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| OLD | NEW |