| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/md5.h" | 8 #include "base/md5.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 ResetSettings(false, false, false, false, false); | 413 ResetSettings(false, false, false, false, false); |
| 414 MockSettings* settings = static_cast<MockSettings*>(settings_.get()); | 414 MockSettings* settings = static_cast<MockSettings*>(settings_.get()); |
| 415 EXPECT_FALSE(settings->params()->allowed()); | 415 EXPECT_FALSE(settings->params()->allowed()); |
| 416 EXPECT_CALL(*settings, RecordStartupState(PROXY_NOT_AVAILABLE)); | 416 EXPECT_CALL(*settings, RecordStartupState(PROXY_NOT_AVAILABLE)); |
| 417 | 417 |
| 418 scoped_ptr<DataReductionProxyConfigurator> configurator( | 418 scoped_ptr<DataReductionProxyConfigurator> configurator( |
| 419 new TestDataReductionProxyConfig()); | 419 new TestDataReductionProxyConfig()); |
| 420 settings_->SetProxyConfigurator(configurator.Pass()); | 420 settings_->SetProxyConfigurator(configurator.Pass()); |
| 421 scoped_refptr<net::TestURLRequestContextGetter> request_context = | 421 scoped_refptr<net::TestURLRequestContextGetter> request_context = |
| 422 new net::TestURLRequestContextGetter(base::MessageLoopProxy::current()); | 422 new net::TestURLRequestContextGetter(base::MessageLoopProxy::current()); |
| 423 settings_->InitDataReductionProxySettings(&pref_service_, | 423 settings_->InitDataReductionProxySettings( |
| 424 &pref_service_, | 424 &pref_service_, |
| 425 request_context.get()); | 425 &pref_service_, |
| 426 request_context.get(), |
| 427 base::Bind(&DataReductionProxySettingsTestBase:: |
| 428 RegisterSyntheticFieldTrialCallback, |
| 429 base::Unretained(this))); |
| 426 | 430 |
| 427 base::MessageLoop::current()->RunUntilIdle(); | 431 base::MessageLoop::current()->RunUntilIdle(); |
| 428 } | 432 } |
| 429 | 433 |
| 430 } // namespace data_reduction_proxy | 434 } // namespace data_reduction_proxy |
| OLD | NEW |