[email protected] | 3a80ea33 | 2012-01-09 19:53:29 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
| 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 |
| 7 | // if we tried to create a service, and not try creating it over and over if |
| 8 | // the creation failed. |
| 9 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 10 | #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| 11 | #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 12 | #pragma once |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
| 16 | #include "base/basictypes.h" |
[email protected] | 6b4e685 | 2012-02-14 04:02:48 | [diff] [blame] | 17 | #include "base/debug/stack_trace.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 18 | #include "base/memory/scoped_ptr.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 19 | #include "base/message_loop.h" |
[email protected] | c917750 | 2011-01-01 04:48:49 | [diff] [blame] | 20 | #include "base/threading/non_thread_safe.h" |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 21 | #include "base/timer.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 22 | #include "chrome/browser/browser_process.h" |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 23 | #include "chrome/browser/prefs/pref_change_registrar.h" |
[email protected] | 8b08a47f | 2011-02-25 12:36:37 | [diff] [blame] | 24 | #include "chrome/browser/prefs/pref_member.h" |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 25 | #include "content/public/browser/browser_thread.h" |
[email protected] | 6c2381d | 2011-10-19 02:52:53 | [diff] [blame] | 26 | #include "content/public/browser/notification_observer.h" |
[email protected] | d55aaa13 | 2009-09-28 21:08:04 | [diff] [blame] | 27 | #include "ipc/ipc_message.h" |
[email protected] | b112a4c | 2009-02-01 20:24:01 | [diff] [blame] | 28 | |
[email protected] | b2fcd0e | 2010-12-01 15:19:40 | [diff] [blame] | 29 | class ChromeNetLog; |
[email protected] | 8bcdf07 | 2011-06-03 16:52:15 | [diff] [blame] | 30 | class ChromeResourceDispatcherHostDelegate; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 31 | class CommandLine; |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 32 | class RemoteDebuggingServer; |
[email protected] | 0b4d338 | 2010-07-14 16:13:04 | [diff] [blame] | 33 | class TabCloseableStateWatcher; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 34 | |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame] | 35 | namespace policy { |
[email protected] | fcf5357 | 2011-06-29 15:44:37 | [diff] [blame] | 36 | class BrowserPolicyConnector; |
[email protected] | a4179c2a | 2012-02-09 18:14:21 | [diff] [blame] | 37 | class PolicyService; |
[email protected] | fcf5357 | 2011-06-29 15:44:37 | [diff] [blame] | 38 | }; |
| 39 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 40 | // Real implementation of BrowserProcess that creates and returns the services. |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 41 | class BrowserProcessImpl : public BrowserProcess, |
[email protected] | c917750 | 2011-01-01 04:48:49 | [diff] [blame] | 42 | public base::NonThreadSafe, |
[email protected] | 6c2381d | 2011-10-19 02:52:53 | [diff] [blame] | 43 | public content::NotificationObserver { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 44 | public: |
[email protected] | f3a4f30 | 2009-08-21 22:35:29 | [diff] [blame] | 45 | explicit BrowserProcessImpl(const CommandLine& command_line); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 46 | virtual ~BrowserProcessImpl(); |
| 47 | |
[email protected] | 9990736 | 2012-01-11 05:41:40 | [diff] [blame] | 48 | // Called before the browser threads are created. |
| 49 | void PreCreateThreads(); |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 50 | |
[email protected] | d2caaa2 | 2011-12-12 03:04:15 | [diff] [blame] | 51 | // Called after the threads have been created but before the message loops |
| 52 | // starts running. Allows the browser process to do any initialization that |
| 53 | // requires all threads running. |
| 54 | void PreMainMessageLoopRun(); |
| 55 | |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 56 | // Most cleanup is done by these functions, driven from |
| 57 | // ChromeBrowserMain based on notifications from the content |
| 58 | // framework, rather than in the destructor, so that we can |
| 59 | // interleave cleanup with threads being stopped. |
| 60 | void StartTearDown(); |
[email protected] | 9990736 | 2012-01-11 05:41:40 | [diff] [blame] | 61 | void PostDestroyThreads(); |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 62 | |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 63 | // BrowserProcess methods |
[email protected] | 9990736 | 2012-01-11 05:41:40 | [diff] [blame] | 64 | virtual void ResourceDispatcherHostCreated() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 65 | virtual void EndSession() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 66 | virtual MetricsService* metrics_service() OVERRIDE; |
| 67 | virtual IOThread* io_thread() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 68 | virtual WatchDogThread* watchdog_thread() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 69 | virtual ProfileManager* profile_manager() OVERRIDE; |
| 70 | virtual PrefService* local_state() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 71 | virtual ui::Clipboard* clipboard() OVERRIDE; |
| 72 | virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 73 | #if defined(OS_CHROMEOS) |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame] | 74 | virtual browser::OomPriorityManager* oom_priority_manager() OVERRIDE; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 75 | #endif // defined(OS_CHROMEOS) |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 76 | virtual ExtensionEventRouterForwarder* |
| 77 | extension_event_router_forwarder() OVERRIDE; |
| 78 | virtual NotificationUIManager* notification_ui_manager() OVERRIDE; |
| 79 | virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; |
[email protected] | a4179c2a | 2012-02-09 18:14:21 | [diff] [blame] | 80 | virtual policy::PolicyService* policy_service() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 81 | virtual IconManager* icon_manager() OVERRIDE; |
| 82 | virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE; |
| 83 | virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE; |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 84 | virtual void InitDevToolsHttpProtocolHandler( |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 85 | Profile* profile, |
[email protected] | 01000cf1 | 2011-02-04 11:39:22 | [diff] [blame] | 86 | const std::string& ip, |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 87 | int port, |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 88 | const std::string& frontend_url) OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 89 | virtual unsigned int AddRefModule() OVERRIDE; |
| 90 | virtual unsigned int ReleaseModule() OVERRIDE; |
| 91 | virtual bool IsShuttingDown() OVERRIDE; |
| 92 | virtual printing::PrintJobManager* print_job_manager() OVERRIDE; |
| 93 | virtual printing::PrintPreviewTabController* |
| 94 | print_preview_tab_controller() OVERRIDE; |
| 95 | virtual printing::BackgroundPrintingManager* |
| 96 | background_printing_manager() OVERRIDE; |
| 97 | virtual GoogleURLTracker* google_url_tracker() OVERRIDE; |
| 98 | virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE; |
| 99 | virtual const std::string& GetApplicationLocale() OVERRIDE; |
| 100 | virtual void SetApplicationLocale(const std::string& locale) OVERRIDE; |
| 101 | virtual DownloadStatusUpdater* download_status_updater() OVERRIDE; |
| 102 | virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE; |
| 103 | virtual TabCloseableStateWatcher* tab_closeable_state_watcher() OVERRIDE; |
| 104 | virtual BackgroundModeManager* background_mode_manager() OVERRIDE; |
| 105 | virtual StatusTray* status_tray() OVERRIDE; |
| 106 | virtual SafeBrowsingService* safe_browsing_service() OVERRIDE; |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 107 | virtual safe_browsing::ClientSideDetectionService* |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 108 | safe_browsing_detection_service() OVERRIDE; |
| 109 | virtual bool plugin_finder_disabled() const OVERRIDE; |
[email protected] | 6641bf66 | 2009-08-21 00:34:09 | [diff] [blame] | 110 | |
[email protected] | 6c2381d | 2011-10-19 02:52:53 | [diff] [blame] | 111 | // content::NotificationObserver methods |
[email protected] | 43211582 | 2011-07-10 15:52:27 | [diff] [blame] | 112 | virtual void Observe(int type, |
[email protected] | 6c2381d | 2011-10-19 02:52:53 | [diff] [blame] | 113 | const content::NotificationSource& source, |
| 114 | const content::NotificationDetails& details) OVERRIDE; |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 115 | |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 116 | #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 117 | virtual void StartAutoupdateTimer() OVERRIDE; |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 118 | #endif |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 119 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 120 | virtual ChromeNetLog* net_log() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 121 | virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 122 | virtual ComponentUpdateService* component_updater() OVERRIDE; |
[email protected] | 0d5c08e | 2011-11-21 16:51:06 | [diff] [blame] | 123 | virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; |
[email protected] | ca167a3 | 2011-09-30 15:19:11 | [diff] [blame] | 124 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 125 | private: |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 126 | void CreateMetricsService(); |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 127 | void CreateWatchdogThread(); |
[email protected] | 2d14b373 | 2011-05-10 16:48:44 | [diff] [blame] | 128 | #if defined(OS_CHROMEOS) |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 129 | void InitializeWebSocketProxyThread(); |
[email protected] | 2d14b373 | 2011-05-10 16:48:44 | [diff] [blame] | 130 | #endif |
[email protected] | 8e5c89a | 2011-06-07 18:13:33 | [diff] [blame] | 131 | void CreateTemplateURLService(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 132 | void CreateProfileManager(); |
| 133 | void CreateWebDataService(); |
| 134 | void CreateLocalState(); |
| 135 | void CreateViewedPageTracker(); |
| 136 | void CreateIconManager(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 137 | void CreateGoogleURLTracker(); |
[email protected] | c4ff495 | 2010-01-08 19:12:47 | [diff] [blame] | 138 | void CreateIntranetRedirectDetector(); |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 139 | void CreateNotificationUIManager(); |
[email protected] | ccb55cf5 | 2010-03-06 22:02:04 | [diff] [blame] | 140 | void CreateStatusTrayManager(); |
[email protected] | 0b4d338 | 2010-07-14 16:13:04 | [diff] [blame] | 141 | void CreateTabCloseableStateWatcher(); |
[email protected] | dbeebd5 | 2010-11-16 20:34:16 | [diff] [blame] | 142 | void CreatePrintPreviewTabController(); |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 143 | void CreateBackgroundPrintingManager(); |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 144 | void CreateSafeBrowsingService(); |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 145 | void CreateSafeBrowsingDetectionService(); |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 146 | void CreateStatusTray(); |
| 147 | void CreateBackgroundModeManager(); |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 148 | |
[email protected] | 419a057 | 2011-04-18 22:21:46 | [diff] [blame] | 149 | void ApplyDisabledSchemesPolicy(); |
[email protected] | 40850a5 | 2011-05-26 22:07:35 | [diff] [blame] | 150 | void ApplyAllowCrossOriginAuthPromptPolicy(); |
[email protected] | b61f62a | 2011-11-01 02:02:10 | [diff] [blame] | 151 | void ApplyDefaultBrowserPolicy(); |
[email protected] | 419a057 | 2011-04-18 22:21:46 | [diff] [blame] | 152 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 153 | bool created_metrics_service_; |
| 154 | scoped_ptr<MetricsService> metrics_service_; |
| 155 | |
[email protected] | 0ac8368 | 2010-01-22 17:46:27 | [diff] [blame] | 156 | scoped_ptr<IOThread> io_thread_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 157 | |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 158 | bool created_watchdog_thread_; |
| 159 | scoped_ptr<WatchDogThread> watchdog_thread_; |
| 160 | |
[email protected] | 8d6b243 | 2012-03-31 12:11:18 | [diff] [blame] | 161 | // Must be destroyed after |local_state_|. |
| 162 | scoped_ptr<policy::PolicyService> policy_service_; |
| 163 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 164 | bool created_profile_manager_; |
| 165 | scoped_ptr<ProfileManager> profile_manager_; |
| 166 | |
| 167 | bool created_local_state_; |
| 168 | scoped_ptr<PrefService> local_state_; |
| 169 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 170 | bool created_icon_manager_; |
| 171 | scoped_ptr<IconManager> icon_manager_; |
| 172 | |
[email protected] | 3ce0241 | 2011-03-01 12:01:15 | [diff] [blame] | 173 | scoped_refptr<ExtensionEventRouterForwarder> |
| 174 | extension_event_router_forwarder_; |
| 175 | |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 176 | scoped_ptr<RemoteDebuggingServer> remote_debugging_server_; |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 177 | |
[email protected] | 985655a | 2011-02-23 09:54:25 | [diff] [blame] | 178 | bool created_browser_policy_connector_; |
| 179 | scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; |
[email protected] | f2a893c | 2011-01-05 09:38:07 | [diff] [blame] | 180 | |
[email protected] | dbeebd5 | 2010-11-16 20:34:16 | [diff] [blame] | 181 | scoped_refptr<printing::PrintPreviewTabController> |
| 182 | print_preview_tab_controller_; |
| 183 | |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 184 | scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; |
| 185 | |
[email protected] | 2dfeaf9 | 2011-01-10 21:08:21 | [diff] [blame] | 186 | scoped_ptr<ui::Clipboard> clipboard_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 187 | |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 188 | // Manager for desktop notification UI. |
| 189 | bool created_notification_ui_manager_; |
| 190 | scoped_ptr<NotificationUIManager> notification_ui_manager_; |
| 191 | |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 192 | #if defined(ENABLE_AUTOMATION) |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 193 | scoped_ptr<AutomationProviderList> automation_provider_list_; |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 194 | #endif |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 195 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 196 | scoped_ptr<GoogleURLTracker> google_url_tracker_; |
[email protected] | c4ff495 | 2010-01-08 19:12:47 | [diff] [blame] | 197 | scoped_ptr<IntranetRedirectDetector> intranet_redirect_detector_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 198 | |
[email protected] | 0b4d338 | 2010-07-14 16:13:04 | [diff] [blame] | 199 | scoped_ptr<TabCloseableStateWatcher> tab_closeable_state_watcher_; |
| 200 | |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 201 | scoped_ptr<StatusTray> status_tray_; |
| 202 | |
[email protected] | 3ba226c5 | 2011-10-27 22:50:24 | [diff] [blame] | 203 | scoped_ptr<BackgroundModeManager> background_mode_manager_; |
| 204 | |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 205 | bool created_safe_browsing_service_; |
| 206 | scoped_refptr<SafeBrowsingService> safe_browsing_service_; |
| 207 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 208 | unsigned int module_ref_count_; |
[email protected] | afd20c02 | 2010-06-10 00:48:20 | [diff] [blame] | 209 | bool did_start_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 210 | |
| 211 | // Ensures that all the print jobs are finished before closing the browser. |
| 212 | scoped_ptr<printing::PrintJobManager> print_job_manager_; |
| 213 | |
[email protected] | d70539de | 2009-06-24 22:17:06 | [diff] [blame] | 214 | std::string locale_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 215 | |
[email protected] | 1b2db1a | 2008-08-08 17:46:13 | [diff] [blame] | 216 | bool checked_for_new_frames_; |
| 217 | bool using_new_frames_; |
| 218 | |
[email protected] | cb85aba | 2010-09-22 18:34:15 | [diff] [blame] | 219 | // This service just sits around and makes thumbnails for tabs. It does |
| 220 | // nothing in the constructor so we don't have to worry about lazy init. |
[email protected] | 7a0e72f | 2011-09-20 19:59:11 | [diff] [blame] | 221 | scoped_ptr<ThumbnailGenerator> thumbnail_generator_; |
[email protected] | 67a46b7f | 2009-06-16 21:41:02 | [diff] [blame] | 222 | |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 223 | // Download status updates (like a changing application icon on dock/taskbar) |
| 224 | // are global per-application. DownloadStatusUpdater does no work in the ctor |
| 225 | // so we don't have to worry about lazy initialization. |
[email protected] | 7a0e72f | 2011-09-20 19:59:11 | [diff] [blame] | 226 | scoped_ptr<DownloadStatusUpdater> download_status_updater_; |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 227 | |
[email protected] | 254ed74 | 2011-08-16 18:45:27 | [diff] [blame] | 228 | scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
| 229 | |
[email protected] | 2a7e7c15 | 2010-10-01 20:12:09 | [diff] [blame] | 230 | // Ensures that the observers of plugin/print disable/enable state |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 231 | // notifications are properly added and removed. |
[email protected] | 2a7e7c15 | 2010-10-01 20:12:09 | [diff] [blame] | 232 | PrefChangeRegistrar pref_change_registrar_; |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 233 | |
[email protected] | b2fcd0e | 2010-12-01 15:19:40 | [diff] [blame] | 234 | // Lives here so can safely log events on shutdown. |
| 235 | scoped_ptr<ChromeNetLog> net_log_; |
| 236 | |
[email protected] | 8bcdf07 | 2011-06-03 16:52:15 | [diff] [blame] | 237 | // Ordered before resource_dispatcher_host_delegate_ due to destruction |
[email protected] | 1459fb6 | 2011-05-25 19:03:27 | [diff] [blame] | 238 | // ordering. |
| 239 | scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
| 240 | |
[email protected] | 8bcdf07 | 2011-06-03 16:52:15 | [diff] [blame] | 241 | scoped_ptr<ChromeResourceDispatcherHostDelegate> |
| 242 | resource_dispatcher_host_delegate_; |
[email protected] | 1459fb6 | 2011-05-25 19:03:27 | [diff] [blame] | 243 | |
[email protected] | 8b08a47f | 2011-02-25 12:36:37 | [diff] [blame] | 244 | // Monitors the state of the 'DisablePluginFinder' policy. |
[email protected] | 2e5b60a2 | 2011-11-28 15:56:41 | [diff] [blame] | 245 | scoped_ptr<BooleanPrefMember> plugin_finder_disabled_pref_; |
[email protected] | 8b08a47f | 2011-02-25 12:36:37 | [diff] [blame] | 246 | |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 247 | #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 248 | base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
| 249 | |
| 250 | // Gets called by autoupdate timer to see if browser needs restart and can be |
| 251 | // restarted, and if that's the case, restarts the browser. |
| 252 | void OnAutoupdateTimer(); |
| 253 | bool CanAutorestartForUpdate() const; |
[email protected] | f6e6d2e | 2011-10-28 18:39:22 | [diff] [blame] | 254 | void RestartBackgroundInstance(); |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 255 | #endif // defined(OS_WIN) || defined(OS_LINUX) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 256 | |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 257 | #if defined(OS_CHROMEOS) |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame] | 258 | scoped_ptr<browser::OomPriorityManager> oom_priority_manager_; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 259 | #endif |
| 260 | |
[email protected] | c1adf5a | 2011-08-03 22:11:37 | [diff] [blame] | 261 | #if !defined(OS_CHROMEOS) |
| 262 | scoped_ptr<ComponentUpdateService> component_updater_; |
[email protected] | ca167a3 | 2011-09-30 15:19:11 | [diff] [blame] | 263 | |
| 264 | scoped_refptr<CRLSetFetcher> crl_set_fetcher_; |
[email protected] | c1adf5a | 2011-08-03 22:11:37 | [diff] [blame] | 265 | #endif |
| 266 | |
[email protected] | 6b4e685 | 2012-02-14 04:02:48 | [diff] [blame] | 267 | // TODO(eroman): Remove this when done debugging 113031. This tracks |
| 268 | // the callstack which released the final module reference count. |
| 269 | base::debug::StackTrace release_last_reference_callstack_; |
| 270 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 271 | DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 272 | }; |
| 273 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 274 | #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |