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

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

Issue 1076853003: Refactor net::BackoffEntry to not require subclassing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make DataReductionProxyConfigServiceClient::Now non-const Created 5 years, 8 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_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
index abdf5cc37a93047d09da3d357483d3c193599470..58f5a77b428fbe1527d55adbf08d7c2b29339b98 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -117,7 +117,7 @@ base::TimeDelta TestDataReductionProxyConfigServiceClient::GetDelay() const {
return config_refresh_timer_.GetCurrentDelay();
}
-base::Time TestDataReductionProxyConfigServiceClient::Now() const {
+base::Time TestDataReductionProxyConfigServiceClient::Now() {
return tick_clock_.Now();
}
@@ -132,12 +132,12 @@ TestDataReductionProxyConfigServiceClient::TestTickClock::TestTickClock(
}
base::TimeTicks
-TestDataReductionProxyConfigServiceClient::TestTickClock::NowTicks() const {
+TestDataReductionProxyConfigServiceClient::TestTickClock::NowTicks() {
return base::TimeTicks::UnixEpoch() + (time_ - base::Time::UnixEpoch());
}
base::Time
-TestDataReductionProxyConfigServiceClient::TestTickClock::Now() const {
+TestDataReductionProxyConfigServiceClient::TestTickClock::Now() {
return time_;
}
@@ -146,19 +146,6 @@ void TestDataReductionProxyConfigServiceClient::TestTickClock::SetTime(
time_ = time;
}
-TestDataReductionProxyConfigServiceClient::TestBackoffEntry::TestBackoffEntry(
- const net::BackoffEntry::Policy* const policy,
- const TestTickClock* tick_clock)
- : net::BackoffEntry(policy),
- tick_clock_(tick_clock) {
-}
-
-base::TimeTicks
-TestDataReductionProxyConfigServiceClient::TestBackoffEntry::ImplGetTimeNow()
- const {
- return tick_clock_->NowTicks();
-}
-
MockDataReductionProxyService::MockDataReductionProxyService(
scoped_ptr<DataReductionProxyCompressionStats> compression_stats,
DataReductionProxySettings* settings,

Powered by Google App Engine
This is Rietveld 408576698