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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc

Issue 949533004: Rename DataReductionProxyStatisticsPrefs to DataReductionProxyCompressionStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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_netw ork_delegate.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw ork_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
11 #include "base/prefs/testing_pref_service.h" 11 #include "base/prefs/testing_pref_service.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/test/histogram_tester.h" 13 #include "base/test/histogram_tester.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h"
15 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_test_utils.h" 16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_test_utils.h"
16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h" 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h"
17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ est_options.h" 18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ est_options.h"
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h"
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test _utils.h" 19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test _utils.h"
20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs_test_utils.h" 20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs_test_utils.h"
21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s_test_utils.h" 21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s_test_utils.h"
22 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 22 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
23 #include "net/base/capturing_net_log.h" 23 #include "net/base/capturing_net_log.h"
24 #include "net/base/host_port_pair.h" 24 #include "net/base/host_port_pair.h"
25 #include "net/base/load_flags.h" 25 #include "net/base/load_flags.h"
26 #include "net/base/net_log.h" 26 #include "net/base/net_log.h"
27 #include "net/http/http_response_headers.h" 27 #include "net/http/http_response_headers.h"
28 #include "net/proxy/proxy_config.h" 28 #include "net/proxy/proxy_config.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 TestingPrefServiceSimple* pref_service() const { 146 TestingPrefServiceSimple* pref_service() const {
147 return test_context_->pref_service(); 147 return test_context_->pref_service();
148 } 148 }
149 149
150 TestDataReductionProxyConfig* config() { 150 TestDataReductionProxyConfig* config() {
151 return test_context_->config(); 151 return test_context_->config();
152 } 152 }
153 153
154 DataReductionProxyStatisticsPrefs* statistics_prefs() const { 154 DataReductionProxyCompressionStats* statistics_prefs() const {
155 return test_context_->data_reduction_proxy_service()->statistics_prefs(); 155 return test_context_->data_reduction_proxy_service()->statistics_prefs();
156 } 156 }
157 157
158 scoped_ptr<DataReductionProxyRequestOptions> request_options_; 158 scoped_ptr<DataReductionProxyRequestOptions> request_options_;
159 scoped_ptr<DataReductionProxyNetworkDelegate> 159 scoped_ptr<DataReductionProxyNetworkDelegate>
160 data_reduction_proxy_network_delegate_; 160 data_reduction_proxy_network_delegate_;
161 161
162 private: 162 private:
163 net::TestURLRequestContext context_; 163 net::TestURLRequestContext context_;
164 net::TestDelegate delegate_; 164 net::TestDelegate delegate_;
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 kReceivedLength); 505 kReceivedLength);
506 506
507 stats_value.reset( 507 stats_value.reset(
508 DataReductionProxyNetworkDelegate::HistoricNetworkStatsInfoToValue( 508 DataReductionProxyNetworkDelegate::HistoricNetworkStatsInfoToValue(
509 &simple_pref_service_)); 509 &simple_pref_service_));
510 EXPECT_TRUE(stats_value->GetAsDictionary(&dict)); 510 EXPECT_TRUE(stats_value->GetAsDictionary(&dict));
511 VerifyPrefs(dict); 511 VerifyPrefs(dict);
512 } 512 }
513 513
514 } // namespace data_reduction_proxy 514 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698