| 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/core/browser/data_reduction_proxy_usag
     e_stats.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag
     e_stats.h" | 
| 6 | 6 | 
| 7 #include <set> | 7 #include <set> | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 588 | 588 | 
| 589     BooleanPrefMember enabled; | 589     BooleanPrefMember enabled; | 
| 590     enabled.Init(prefs::kDataReductionProxyEnabled, simple_prefs); | 590     enabled.Init(prefs::kDataReductionProxyEnabled, simple_prefs); | 
| 591     enabled.SetValue(true); | 591     enabled.SetValue(true); | 
| 592     enabled.Destroy(); | 592     enabled.Destroy(); | 
| 593 | 593 | 
| 594     settings()->SetProxyConfigurator(test_context_->configurator()); | 594     settings()->SetProxyConfigurator(test_context_->configurator()); | 
| 595     settings()->InitDataReductionProxySettings( | 595     settings()->InitDataReductionProxySettings( | 
| 596         test_context_->pref_service(), test_context_->CreateStatisticsPrefs(), | 596         test_context_->pref_service(), test_context_->CreateStatisticsPrefs(), | 
| 597         test_context_->request_context(), test_context_->net_log(), | 597         test_context_->request_context(), test_context_->net_log(), | 
| 598         test_context_->event_store()); | 598         test_context_->event_store(), false); | 
| 599     test_context_->io_data()->SetDataReductionProxyStatisticsPrefs( | 599     test_context_->io_data()->SetDataReductionProxyStatisticsPrefs( | 
| 600         settings()->statistics_prefs()); | 600         settings()->statistics_prefs()); | 
| 601 | 601 | 
| 602     network_delegate_ = test_context_->io_data()->CreateNetworkDelegate( | 602     network_delegate_ = test_context_->io_data()->CreateNetworkDelegate( | 
| 603         scoped_ptr<net::NetworkDelegate>(new net::TestNetworkDelegate()), true); | 603         scoped_ptr<net::NetworkDelegate>(new net::TestNetworkDelegate()), true); | 
| 604     context_.set_network_delegate(network_delegate_.get()); | 604     context_.set_network_delegate(network_delegate_.get()); | 
| 605 | 605 | 
| 606     context_.set_client_socket_factory(&mock_socket_factory_); | 606     context_.set_client_socket_factory(&mock_socket_factory_); | 
| 607 | 607 | 
| 608     job_factory_.reset(new net::URLRequestInterceptingJobFactory( | 608     job_factory_.reset(new net::URLRequestInterceptingJobFactory( | 
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 953   histogram_tester.ExpectUniqueSample( | 953   histogram_tester.ExpectUniqueSample( | 
| 954       "DataReductionProxy.BypassedBytes.NetworkErrorOther", kBody.size(), 1); | 954       "DataReductionProxy.BypassedBytes.NetworkErrorOther", kBody.size(), 1); | 
| 955   ExpectOtherBypassedBytesHistogramsEmpty( | 955   ExpectOtherBypassedBytesHistogramsEmpty( | 
| 956       histogram_tester, "DataReductionProxy.BypassedBytes.NetworkErrorOther"); | 956       histogram_tester, "DataReductionProxy.BypassedBytes.NetworkErrorOther"); | 
| 957   histogram_tester.ExpectUniqueSample( | 957   histogram_tester.ExpectUniqueSample( | 
| 958       "DataReductionProxy.BypassOnNetworkErrorPrimary", | 958       "DataReductionProxy.BypassOnNetworkErrorPrimary", | 
| 959       -net::ERR_PROXY_CONNECTION_FAILED, 1); | 959       -net::ERR_PROXY_CONNECTION_FAILED, 1); | 
| 960 } | 960 } | 
| 961 | 961 | 
| 962 }  // namespace data_reduction_proxy | 962 }  // namespace data_reduction_proxy | 
| OLD | NEW | 
|---|