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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc

Issue 880963006: Create a new DataReductionProxyConfig class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
index 157f0d82b325be2289e49e0e55a5f6cd1b3ed85a..406ece1ea47d03346dc481365979839f136fb6a0 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
@@ -81,12 +81,13 @@ class DataReductionProxyProtocolTest : public testing::Test {
public:
DataReductionProxyProtocolTest() : http_user_agent_settings_("", "") {
settings_.reset(
- new DataReductionProxySettings(CreateTestDataReductionProxyParams()));
- proxy_params_.reset(CreateTestDataReductionProxyParams());
+ new DataReductionProxySettings(CreateDataReductionProxyParams()));
+ proxy_params_.reset(CreateDataReductionProxyParams().release());
simple_interceptor_.reset(new SimpleURLRequestInterceptor());
net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
"http", "www.google.com", simple_interceptor_.Pass());
}
+
~DataReductionProxyProtocolTest() override {
// URLRequestJobs may post clean-up tasks on destruction.
net::URLRequestFilter::GetInstance()->RemoveHostnameHandler(
@@ -94,14 +95,16 @@ class DataReductionProxyProtocolTest : public testing::Test {
base::RunLoop().RunUntilIdle();
}
- TestDataReductionProxyParams* CreateTestDataReductionProxyParams() {
- return new TestDataReductionProxyParams(
- DataReductionProxyParams::kAllowed |
- DataReductionProxyParams::kFallbackAllowed |
- DataReductionProxyParams::kPromoAllowed,
- TestDataReductionProxyParams::HAS_EVERYTHING &
- ~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
- ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN);
+ scoped_ptr<TestDataReductionProxyParams> CreateDataReductionProxyParams() {
+ return scoped_ptr<TestDataReductionProxyParams>(
+ new TestDataReductionProxyParams(
+ DataReductionProxyParams::kAllowed |
+ DataReductionProxyParams::kFallbackAllowed |
+ DataReductionProxyParams::kPromoAllowed,
+ TestDataReductionProxyParams::HAS_EVERYTHING &
+ ~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
+ ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN))
+ .Pass();
}
void SetUp() override {

Powered by Google App Engine
This is Rietveld 408576698