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

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
25 TestingBrowserProcess::~TestingBrowserProcess() { 26 TestingBrowserProcess::~TestingBrowserProcess() {
27 pref_proxy_config_tracker_ = NULL;
26 } 28 }
27 29
28 void TestingBrowserProcess::EndSession() { 30 void TestingBrowserProcess::EndSession() {
29 } 31 }
30 32
31 ResourceDispatcherHost* TestingBrowserProcess::resource_dispatcher_host() { 33 ResourceDispatcherHost* TestingBrowserProcess::resource_dispatcher_host() {
32 return NULL; 34 return NULL;
33 } 35 }
34 36
35 MetricsService* TestingBrowserProcess::metrics_service() { 37 MetricsService* TestingBrowserProcess::metrics_service() {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 103
102 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() { 104 TabCloseableStateWatcher* TestingBrowserProcess::tab_closeable_state_watcher() {
103 return NULL; 105 return NULL;
104 } 106 }
105 107
106 safe_browsing::ClientSideDetectionService* 108 safe_browsing::ClientSideDetectionService*
107 TestingBrowserProcess::safe_browsing_detection_service() { 109 TestingBrowserProcess::safe_browsing_detection_service() {
108 return NULL; 110 return NULL;
109 } 111 }
110 112
113 PrefProxyConfigTracker* TestingBrowserProcess::pref_proxy_config_tracker() {
114 if (!pref_proxy_config_tracker_.get()) {
115 pref_proxy_config_tracker_ =
116 new PrefProxyConfigTracker(local_state());
117 }
118 return pref_proxy_config_tracker_.get();
119 }
120
121 scoped_refptr<URLRequestContextGetter>
122 TestingBrowserProcess::system_request_context() {
123 return NULL;
124 }
125
111 ui::Clipboard* TestingBrowserProcess::clipboard() { 126 ui::Clipboard* TestingBrowserProcess::clipboard() {
112 if (!clipboard_.get()) { 127 if (!clipboard_.get()) {
113 // Note that we need a MessageLoop for the next call to work. 128 // Note that we need a MessageLoop for the next call to work.
114 clipboard_.reset(new ui::Clipboard); 129 clipboard_.reset(new ui::Clipboard);
115 } 130 }
116 return clipboard_.get(); 131 return clipboard_.get();
117 } 132 }
118 133
119 NotificationUIManager* TestingBrowserProcess::notification_ui_manager() { 134 NotificationUIManager* TestingBrowserProcess::notification_ui_manager() {
120 return NULL; 135 return NULL;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 200 }
186 201
187 void TestingBrowserProcess::SetPrefService(PrefService* pref_service) { 202 void TestingBrowserProcess::SetPrefService(PrefService* pref_service) {
188 pref_service_ = pref_service; 203 pref_service_ = pref_service;
189 } 204 }
190 205
191 void TestingBrowserProcess::SetGoogleURLTracker( 206 void TestingBrowserProcess::SetGoogleURLTracker(
192 GoogleURLTracker* google_url_tracker) { 207 GoogleURLTracker* google_url_tracker) {
193 google_url_tracker_.reset(google_url_tracker); 208 google_url_tracker_.reset(google_url_tracker);
194 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698