Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/test/testing_browser_process.cc

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.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/configuration_policy_provider_keeper.h" 13 #include "chrome/browser/policy/configuration_policy_provider_keeper.h"
14 #include "chrome/browser/policy/dummy_configuration_policy_provider.h" 14 #include "chrome/browser/policy/dummy_configuration_policy_provider.h"
15 #include "chrome/common/net/url_request_context_getter.h"
15 #include "ui/base/clipboard/clipboard.h" 16 #include "ui/base/clipboard/clipboard.h"
16 17
17 TestingBrowserProcess::TestingBrowserProcess() 18 TestingBrowserProcess::TestingBrowserProcess()
18 : shutdown_event_(new base::WaitableEvent(true, false)), 19 : shutdown_event_(new base::WaitableEvent(true, false)),
19 module_ref_count_(0), 20 module_ref_count_(0),
20 app_locale_("en"), 21 app_locale_("en"),
21 pref_service_(NULL), 22 pref_service_(NULL),
22 created_configuration_policy_provider_keeper_(false) { 23 created_configuration_policy_provider_keeper_(false) {
23 } 24 }
24 25
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { 103 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() {
103 return NULL; 104 return NULL;
104 } 105 }
105 106
106 safe_browsing::ClientSideDetectionService* 107 safe_browsing::ClientSideDetectionService*
107 TestingBrowserProcess::safe_browsing_detection_service() { 108 TestingBrowserProcess::safe_browsing_detection_service() {
108 return NULL; 109 return NULL;
109 } 110 }
110 111
112 scoped_refptr<URLRequestContextGetter>
113 TestingBrowserProcess::system_request_context() {
114 return NULL;
115 }
116
117 #if defined(OS_CHROMEOS)
118 chromeos::ProxyConfigServiceImpl*
119 TestingBrowserProcess::chromeos_proxy_config_service_impl() {
120 return NULL;
121 }
122 #endif // defined(OS_CHROMEOS)
123
111 ui::Clipboard* TestingBrowserProcess::clipboard() { 124 ui::Clipboard* TestingBrowserProcess::clipboard() {
112 if (!clipboard_.get()) { 125 if (!clipboard_.get()) {
113 // Note that we need a MessageLoop for the next call to work. 126 // Note that we need a MessageLoop for the next call to work.
114 clipboard_.reset(new ui::Clipboard); 127 clipboard_.reset(new ui::Clipboard);
115 } 128 }
116 return clipboard_.get(); 129 return clipboard_.get();
117 } 130 }
118 131
119 NotificationUIManager* TestingBrowserProcess::notification_ui_manager() { 132 NotificationUIManager* TestingBrowserProcess::notification_ui_manager() {
120 return NULL; 133 return NULL;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 225
213 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { 226 ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() {
214 DCHECK_EQ(browser_process_.get(), g_browser_process); 227 DCHECK_EQ(browser_process_.get(), g_browser_process);
215 228
216 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 229 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
217 // After the transition is over, we should just 230 // After the transition is over, we should just
218 // reset |g_browser_process| to NULL. 231 // reset |g_browser_process| to NULL.
219 browser_process_.reset(); 232 browser_process_.reset();
220 g_browser_process = new TestingBrowserProcess(); 233 g_browser_process = new TestingBrowserProcess();
221 } 234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698