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_ |
11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/debug/stack_trace.h" | 16 #include "base/debug/stack_trace.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/prefs/public/pref_change_registrar.h" | 19 #include "base/prefs/public/pref_change_registrar.h" |
20 #include "base/threading/non_thread_safe.h" | 20 #include "base/threading/non_thread_safe.h" |
21 #include "base/timer.h" | 21 #include "base/timer.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 | 23 |
24 class ChromeNetLog; | 24 class ChromeNetLog; |
25 class ChromeResourceDispatcherHostDelegate; | 25 class ChromeResourceDispatcherHostDelegate; |
26 class CommandLine; | 26 class CommandLine; |
27 class RemoteDebuggingServer; | 27 class RemoteDebuggingServer; |
28 class PrefServiceSimple; | 28 class PrefRegistrySimple; |
29 class PromoResourceService; | 29 class PromoResourceService; |
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 { | 35 namespace base { |
36 class SequencedTaskRunner; | 36 class SequencedTaskRunner; |
37 } | 37 } |
38 | 38 |
(...skipping 30 matching lines...) Expand all Loading... |
69 void StartTearDown(); | 69 void StartTearDown(); |
70 void PostDestroyThreads(); | 70 void PostDestroyThreads(); |
71 | 71 |
72 // BrowserProcess implementation. | 72 // BrowserProcess implementation. |
73 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 73 virtual void ResourceDispatcherHostCreated() OVERRIDE; |
74 virtual void EndSession() OVERRIDE; | 74 virtual void EndSession() OVERRIDE; |
75 virtual MetricsService* metrics_service() OVERRIDE; | 75 virtual MetricsService* metrics_service() OVERRIDE; |
76 virtual IOThread* io_thread() OVERRIDE; | 76 virtual IOThread* io_thread() OVERRIDE; |
77 virtual WatchDogThread* watchdog_thread() OVERRIDE; | 77 virtual WatchDogThread* watchdog_thread() OVERRIDE; |
78 virtual ProfileManager* profile_manager() OVERRIDE; | 78 virtual ProfileManager* profile_manager() OVERRIDE; |
79 virtual PrefServiceSimple* local_state() OVERRIDE; | 79 virtual PrefService* local_state() OVERRIDE; |
80 virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; | 80 virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; |
81 virtual chrome_variations::VariationsService* variations_service() OVERRIDE; | 81 virtual chrome_variations::VariationsService* variations_service() OVERRIDE; |
82 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
83 virtual chromeos::OomPriorityManager* oom_priority_manager() OVERRIDE; | 83 virtual chromeos::OomPriorityManager* oom_priority_manager() OVERRIDE; |
84 #endif // defined(OS_CHROMEOS) | 84 #endif // defined(OS_CHROMEOS) |
85 virtual extensions::EventRouterForwarder* | 85 virtual extensions::EventRouterForwarder* |
86 extension_event_router_forwarder() OVERRIDE; | 86 extension_event_router_forwarder() OVERRIDE; |
87 virtual NotificationUIManager* notification_ui_manager() OVERRIDE; | 87 virtual NotificationUIManager* notification_ui_manager() OVERRIDE; |
88 #if defined(ENABLE_MESSAGE_CENTER) | 88 #if defined(ENABLE_MESSAGE_CENTER) |
89 virtual message_center::MessageCenter* message_center() OVERRIDE; | 89 virtual message_center::MessageCenter* message_center() OVERRIDE; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 virtual ChromeNetLog* net_log() OVERRIDE; | 125 virtual ChromeNetLog* net_log() OVERRIDE; |
126 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; | 126 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; |
127 virtual ComponentUpdateService* component_updater() OVERRIDE; | 127 virtual ComponentUpdateService* component_updater() OVERRIDE; |
128 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; | 128 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; |
129 virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE; | 129 virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE; |
130 virtual chrome::MediaFileSystemRegistry* | 130 virtual chrome::MediaFileSystemRegistry* |
131 media_file_system_registry() OVERRIDE; | 131 media_file_system_registry() OVERRIDE; |
132 virtual void PlatformSpecificCommandLineProcessing( | 132 virtual void PlatformSpecificCommandLineProcessing( |
133 const CommandLine& command_line) OVERRIDE; | 133 const CommandLine& command_line) OVERRIDE; |
134 | 134 |
| 135 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 136 |
135 private: | 137 private: |
136 void CreateMetricsService(); | 138 void CreateMetricsService(); |
137 void CreateWatchdogThread(); | 139 void CreateWatchdogThread(); |
138 #if defined(OS_CHROMEOS) | 140 #if defined(OS_CHROMEOS) |
139 void InitializeWebSocketProxyThread(); | 141 void InitializeWebSocketProxyThread(); |
140 #endif | 142 #endif |
141 void CreateProfileManager(); | 143 void CreateProfileManager(); |
142 void CreateLocalState(); | 144 void CreateLocalState(); |
143 void CreateViewedPageTracker(); | 145 void CreateViewedPageTracker(); |
144 void CreateIconManager(); | 146 void CreateIconManager(); |
(...skipping 30 matching lines...) Expand all Loading... |
175 | 177 |
176 // Must be destroyed after |local_state_|. | 178 // Must be destroyed after |local_state_|. |
177 // This is a stub when policy is not enabled. Otherwise, the PolicyService | 179 // This is a stub when policy is not enabled. Otherwise, the PolicyService |
178 // is owned by the |browser_policy_connector_| and this is not used. | 180 // is owned by the |browser_policy_connector_| and this is not used. |
179 scoped_ptr<policy::PolicyService> policy_service_; | 181 scoped_ptr<policy::PolicyService> policy_service_; |
180 | 182 |
181 bool created_profile_manager_; | 183 bool created_profile_manager_; |
182 scoped_ptr<ProfileManager> profile_manager_; | 184 scoped_ptr<ProfileManager> profile_manager_; |
183 | 185 |
184 bool created_local_state_; | 186 bool created_local_state_; |
185 scoped_ptr<PrefServiceSimple> local_state_; | 187 scoped_ptr<PrefService> local_state_; |
186 | 188 |
187 bool created_icon_manager_; | 189 bool created_icon_manager_; |
188 scoped_ptr<IconManager> icon_manager_; | 190 scoped_ptr<IconManager> icon_manager_; |
189 | 191 |
190 scoped_ptr<GLStringManager> gl_string_manager_; | 192 scoped_ptr<GLStringManager> gl_string_manager_; |
191 | 193 |
192 scoped_refptr<extensions::EventRouterForwarder> | 194 scoped_refptr<extensions::EventRouterForwarder> |
193 extension_event_router_forwarder_; | 195 extension_event_router_forwarder_; |
194 | 196 |
195 #if !defined(OS_ANDROID) | 197 #if !defined(OS_ANDROID) |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 #endif | 305 #endif |
304 | 306 |
305 // TODO(eroman): Remove this when done debugging 113031. This tracks | 307 // TODO(eroman): Remove this when done debugging 113031. This tracks |
306 // the callstack which released the final module reference count. | 308 // the callstack which released the final module reference count. |
307 base::debug::StackTrace release_last_reference_callstack_; | 309 base::debug::StackTrace release_last_reference_callstack_; |
308 | 310 |
309 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 311 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
310 }; | 312 }; |
311 | 313 |
312 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 314 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |