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