Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc |
| index 8f277a960a60490e1dcbc309e1e0c25c43653103..ccba3c0a5e7ce863d6f5046ea236c8f4162829f9 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc |
| @@ -147,7 +147,6 @@ class TestLoFiDecider : public LoFiDecider { |
| void MaybeSetAcceptTransformHeader( |
| const net::URLRequest& request, |
| - bool is_previews_disabled, |
| net::HttpRequestHeaders* headers) const override { |
| if (should_request_lofi_resource_) { |
| headers->SetHeader(chrome_proxy_accept_transform_header(), |
| @@ -182,10 +181,10 @@ class TestLoFiDecider : public LoFiDecider { |
| headers->RemoveHeader(chrome_proxy_accept_transform_header()); |
| } |
| - void MaybeSetIgnorePreviewsBlacklistDirective( |
| + void MaybeSetForceLitePageDirective( |
| net::HttpRequestHeaders* headers) const override {} |
| - bool ShouldRecordLoFiUMA(const net::URLRequest& request) const override { |
| + bool ShouldRecordPreviewsUMA(const net::URLRequest& request) const override { |
| return should_request_lofi_resource_; |
| } |
| @@ -781,7 +780,7 @@ TEST_F(DataReductionProxyNetworkDelegateTest, LoFiTransitions) { |
| // Enable Lo-Fi. |
| const struct { |
| bool lofi_switch_enabled; |
| - bool auto_lofi_enabled; |
| + bool lofi_field_trial; |
| bool is_data_reduction_proxy; |
| } tests[] = { |
| { |
| @@ -810,11 +809,11 @@ TEST_F(DataReductionProxyNetworkDelegateTest, LoFiTransitions) { |
| switches::kDataReductionProxyLoFiValueAlwaysOn); |
| } |
| base::FieldTrialList field_trial_list(nullptr); |
| - if (tests[i].auto_lofi_enabled) { |
| + if (tests[i].lofi_field_trial) { |
| base::FieldTrialList::CreateFieldTrial(params::GetLoFiFieldTrialName(), |
| "Enabled"); |
| } |
| - config()->SetNetworkProhibitivelySlow(tests[i].auto_lofi_enabled); |
| + config()->SetNetworkProhibitivelySlow(tests[i].lofi_field_trial); |
| io_data()->SetLoFiModeActiveOnMainFrame(false); |
| net::ProxyInfo data_reduction_proxy_info; |
| @@ -1174,7 +1173,7 @@ TEST_F(DataReductionProxyNetworkDelegateTest, NetHistograms) { |
| // Check Lo-Fi histograms. |
| const struct { |
| bool lofi_enabled_through_switch; |
| - bool auto_lofi_enabled; |
| + bool lofi_field_trial; |
|
bengr
2017/05/01 16:53:14
Does this mean "in the enabled group of the lofi f
|
| int expected_count; |
| } tests[] = { |
| { |
| @@ -1182,7 +1181,7 @@ TEST_F(DataReductionProxyNetworkDelegateTest, NetHistograms) { |
| false, false, 0, |
| }, |
| { |
| - // Auto Lo-Fi enabled. |
| + // Lo-Fi enabled by field trial. |
| // This should populate Lo-Fi content length histogram. |
| false, true, 1, |
| }, |
| @@ -1192,7 +1191,7 @@ TEST_F(DataReductionProxyNetworkDelegateTest, NetHistograms) { |
| true, false, 1, |
| }, |
| { |
| - // Lo-Fi enabled through switch and Auto Lo-Fi also enabled. |
| + // Lo-Fi enabled through switch and also field trial. |
| // This should populate Lo-Fi content length histogram. |
| true, true, 1, |
| }, |
| @@ -1200,9 +1199,9 @@ TEST_F(DataReductionProxyNetworkDelegateTest, NetHistograms) { |
| for (size_t i = 0; i < arraysize(tests); ++i) { |
| config()->ResetLoFiStatusForTest(); |
| - config()->SetNetworkProhibitivelySlow(tests[i].auto_lofi_enabled); |
| + config()->SetNetworkProhibitivelySlow(tests[i].lofi_field_trial); |
| base::FieldTrialList field_trial_list(nullptr); |
| - if (tests[i].auto_lofi_enabled) { |
| + if (tests[i].lofi_field_trial) { |
| base::FieldTrialList::CreateFieldTrial(params::GetLoFiFieldTrialName(), |
| "Enabled"); |
| } |