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