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

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: Address pneubeck's review comments 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 7aff4be710b59be0c8858c97d9382c3fd3312793..b3c9c4ac1d27f7d66d159002ec6b2aca863ce568 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
@@ -113,7 +113,7 @@ base::TimeDelta TestDataReductionProxyConfigServiceClient::GetDelay() const {
return config_refresh_timer_.GetCurrentDelay();
}
-base::Time TestDataReductionProxyConfigServiceClient::Now() const {
+base::Time TestDataReductionProxyConfigServiceClient::Now() {
return tick_clock_.Now();
}
@@ -128,12 +128,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_;
}
@@ -142,19 +142,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