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 virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; | 88 virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; |
89 virtual policy::PolicyService* policy_service() OVERRIDE; | 89 virtual policy::PolicyService* policy_service() OVERRIDE; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 virtual ChromeNetLog* net_log() OVERRIDE; | 122 virtual ChromeNetLog* net_log() OVERRIDE; |
123 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; | 123 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; |
124 virtual ComponentUpdateService* component_updater() OVERRIDE; | 124 virtual ComponentUpdateService* component_updater() OVERRIDE; |
125 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; | 125 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; |
126 virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE; | 126 virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE; |
127 virtual chrome::MediaFileSystemRegistry* | 127 virtual chrome::MediaFileSystemRegistry* |
128 media_file_system_registry() OVERRIDE; | 128 media_file_system_registry() OVERRIDE; |
129 virtual void PlatformSpecificCommandLineProcessing( | 129 virtual void PlatformSpecificCommandLineProcessing( |
130 const CommandLine& command_line) OVERRIDE; | 130 const CommandLine& command_line) OVERRIDE; |
131 | 131 |
| 132 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 133 |
132 private: | 134 private: |
133 void CreateMetricsService(); | 135 void CreateMetricsService(); |
134 void CreateWatchdogThread(); | 136 void CreateWatchdogThread(); |
135 #if defined(OS_CHROMEOS) | 137 #if defined(OS_CHROMEOS) |
136 void InitializeWebSocketProxyThread(); | 138 void InitializeWebSocketProxyThread(); |
137 #endif | 139 #endif |
138 void CreateProfileManager(); | 140 void CreateProfileManager(); |
139 void CreateLocalState(); | 141 void CreateLocalState(); |
140 void CreateViewedPageTracker(); | 142 void CreateViewedPageTracker(); |
141 void CreateIconManager(); | 143 void CreateIconManager(); |
(...skipping 27 matching lines...) Expand all Loading... |
169 | 171 |
170 // Must be destroyed after |local_state_|. | 172 // Must be destroyed after |local_state_|. |
171 // This is a stub when policy is not enabled. Otherwise, the PolicyService | 173 // This is a stub when policy is not enabled. Otherwise, the PolicyService |
172 // is owned by the |browser_policy_connector_| and this is not used. | 174 // is owned by the |browser_policy_connector_| and this is not used. |
173 scoped_ptr<policy::PolicyService> policy_service_; | 175 scoped_ptr<policy::PolicyService> policy_service_; |
174 | 176 |
175 bool created_profile_manager_; | 177 bool created_profile_manager_; |
176 scoped_ptr<ProfileManager> profile_manager_; | 178 scoped_ptr<ProfileManager> profile_manager_; |
177 | 179 |
178 bool created_local_state_; | 180 bool created_local_state_; |
179 scoped_ptr<PrefServiceSimple> local_state_; | 181 scoped_ptr<PrefService> local_state_; |
180 | 182 |
181 bool created_icon_manager_; | 183 bool created_icon_manager_; |
182 scoped_ptr<IconManager> icon_manager_; | 184 scoped_ptr<IconManager> icon_manager_; |
183 | 185 |
184 scoped_ptr<GLStringManager> gl_string_manager_; | 186 scoped_ptr<GLStringManager> gl_string_manager_; |
185 | 187 |
186 scoped_refptr<extensions::EventRouterForwarder> | 188 scoped_refptr<extensions::EventRouterForwarder> |
187 extension_event_router_forwarder_; | 189 extension_event_router_forwarder_; |
188 | 190 |
189 #if !defined(OS_ANDROID) | 191 #if !defined(OS_ANDROID) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 #endif | 293 #endif |
292 | 294 |
293 // TODO(eroman): Remove this when done debugging 113031. This tracks | 295 // TODO(eroman): Remove this when done debugging 113031. This tracks |
294 // the callstack which released the final module reference count. | 296 // the callstack which released the final module reference count. |
295 base::debug::StackTrace release_last_reference_callstack_; | 297 base::debug::StackTrace release_last_reference_callstack_; |
296 | 298 |
297 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 299 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
298 }; | 300 }; |
299 | 301 |
300 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 302 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |