OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/test/testing_browser_process.h" | 5 #include "chrome/test/testing_browser_process.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "chrome/browser/google/google_url_tracker.h" | 9 #include "chrome/browser/google/google_url_tracker.h" |
10 #include "chrome/browser/policy/browser_policy_connector.h" | 10 #include "chrome/browser/policy/browser_policy_connector.h" |
11 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 11 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
12 #include "chrome/browser/policy/configuration_policy_provider.h" | 12 #include "chrome/browser/policy/configuration_policy_provider.h" |
13 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" | 13 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" |
14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/common/net/url_request_context_getter.h" | |
16 #include "ui/base/clipboard/clipboard.h" | 17 #include "ui/base/clipboard/clipboard.h" |
17 | 18 |
18 TestingBrowserProcess::TestingBrowserProcess() | 19 TestingBrowserProcess::TestingBrowserProcess() |
19 : shutdown_event_(new base::WaitableEvent(true, false)), | 20 : shutdown_event_(new base::WaitableEvent(true, false)), |
20 module_ref_count_(0), | 21 module_ref_count_(0), |
21 app_locale_("en"), | 22 app_locale_("en"), |
22 pref_service_(NULL) { | 23 pref_service_(NULL) { |
23 } | 24 } |
24 | 25 |
25 TestingBrowserProcess::~TestingBrowserProcess() { | 26 TestingBrowserProcess::~TestingBrowserProcess() { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 107 |
107 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { | 108 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { |
108 return NULL; | 109 return NULL; |
109 } | 110 } |
110 | 111 |
111 safe_browsing::ClientSideDetectionService* | 112 safe_browsing::ClientSideDetectionService* |
112 TestingBrowserProcess::safe_browsing_detection_service() { | 113 TestingBrowserProcess::safe_browsing_detection_service() { |
113 return NULL; | 114 return NULL; |
114 } | 115 } |
115 | 116 |
117 scoped_refptr<URLRequestContextGetter> | |
118 TestingBrowserProcess::system_request_context() { | |
119 return NULL; | |
Mattias Nissler (ping if slow)
2011/03/09 11:04:56
Are we prepared to handle that?
battre
2011/03/09 19:24:07
Currently, there are only two use cases of system_
| |
120 } | |
121 | |
122 #if defined(OS_CHROMEOS) | |
123 chromeos::ProxyConfigServiceImpl* | |
124 TestingBrowserProcess::chromeos_proxy_config_service_impl() { | |
125 return NULL; | |
Mattias Nissler (ping if slow)
2011/03/09 11:04:56
same here?
battre
2011/03/09 19:24:07
This was copied literally from TestingProfile.
| |
126 } | |
127 #endif // defined(OS_CHROMEOS) | |
128 | |
116 ui::Clipboard* TestingBrowserProcess::clipboard() { | 129 ui::Clipboard* TestingBrowserProcess::clipboard() { |
117 if (!clipboard_.get()) { | 130 if (!clipboard_.get()) { |
118 // Note that we need a MessageLoop for the next call to work. | 131 // Note that we need a MessageLoop for the next call to work. |
119 clipboard_.reset(new ui::Clipboard); | 132 clipboard_.reset(new ui::Clipboard); |
120 } | 133 } |
121 return clipboard_.get(); | 134 return clipboard_.get(); |
122 } | 135 } |
123 | 136 |
124 ExtensionEventRouterForwarder* | 137 ExtensionEventRouterForwarder* |
125 TestingBrowserProcess::extension_event_router_forwarder() { | 138 TestingBrowserProcess::extension_event_router_forwarder() { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 | 239 |
227 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { | 240 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { |
228 DCHECK_EQ(browser_process_.get(), g_browser_process); | 241 DCHECK_EQ(browser_process_.get(), g_browser_process); |
229 | 242 |
230 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. | 243 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. |
231 // After the transition is over, we should just | 244 // After the transition is over, we should just |
232 // reset |g_browser_process| to NULL. | 245 // reset |g_browser_process| to NULL. |
233 browser_process_.reset(); | 246 browser_process_.reset(); |
234 g_browser_process = new TestingBrowserProcess(); | 247 g_browser_process = new TestingBrowserProcess(); |
235 } | 248 } |
OLD | NEW |