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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc

Issue 449973002: Use data reduction proxy when managed proxy config returns direct (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-uma-in-proxy-service
Patch Set: Addressed comment and nit Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
index ccd3c2dd2b4211d804a2e2053456120998a8b854..7cf609a139d3d4a123d0900208a2c563bde4c266 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
@@ -146,7 +146,8 @@ void DataReductionProxySettingsTestBase::ResetSettings(bool allowed,
EXPECT_CALL(*settings, GetURLFetcherForWarmup()).Times(0);
EXPECT_CALL(*settings, LogProxyState(_, _, _)).Times(0);
settings_.reset(settings);
- settings_->configurator_.reset(new TestDataReductionProxyConfig());
+ configurator_.reset(new TestDataReductionProxyConfig());
+ settings_->configurator_ = configurator_.get();
}
// Explicitly generate required instantiations.
@@ -210,8 +211,7 @@ void DataReductionProxySettingsTestBase::CheckProxyConfigs(
bool expected_restricted,
bool expected_fallback_restricted) {
TestDataReductionProxyConfig* config =
- static_cast<TestDataReductionProxyConfig*>(
- settings_->configurator_.get());
+ static_cast<TestDataReductionProxyConfig*>(settings_->configurator_);
ASSERT_EQ(expected_restricted, config->restricted_);
ASSERT_EQ(expected_fallback_restricted, config->fallback_restricted_);
ASSERT_EQ(expected_enabled, config->enabled_);
@@ -297,7 +297,7 @@ void DataReductionProxySettingsTestBase::CheckInitDataReductionProxy(
enabled_at_startup ? 1 : 0);
scoped_ptr<DataReductionProxyConfigurator> configurator(
new TestDataReductionProxyConfig());
- settings_->SetProxyConfigurator(configurator.Pass());
+ settings_->SetProxyConfigurator(configurator.get());
scoped_refptr<net::TestURLRequestContextGetter> request_context =
new net::TestURLRequestContextGetter(base::MessageLoopProxy::current());

Powered by Google App Engine
This is Rietveld 408576698