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

Side by Side Diff: components/domain_reliability/util.cc

Issue 681993003: Revert of Revert of Domain Reliability: Switch to BackoffEntry in Scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parse_retry_after_header
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « components/domain_reliability/util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/domain_reliability/util.h" 5 #include "components/domain_reliability/util.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ActualTime::ActualTime() {} 129 ActualTime::ActualTime() {}
130 ActualTime::~ActualTime() {} 130 ActualTime::~ActualTime() {}
131 131
132 base::Time ActualTime::Now() { return base::Time::Now(); } 132 base::Time ActualTime::Now() { return base::Time::Now(); }
133 base::TimeTicks ActualTime::NowTicks() { return base::TimeTicks::Now(); } 133 base::TimeTicks ActualTime::NowTicks() { return base::TimeTicks::Now(); }
134 134
135 scoped_ptr<MockableTime::Timer> ActualTime::CreateTimer() { 135 scoped_ptr<MockableTime::Timer> ActualTime::CreateTimer() {
136 return scoped_ptr<MockableTime::Timer>(new ActualTimer()); 136 return scoped_ptr<MockableTime::Timer>(new ActualTimer());
137 } 137 }
138 138
139 MockableTimeBackoffEntry::MockableTimeBackoffEntry(
140 const net::BackoffEntry::Policy* const policy,
141 MockableTime* time)
142 : net::BackoffEntry(policy),
143 time_(time) {
144 }
145
146 MockableTimeBackoffEntry::~MockableTimeBackoffEntry() {}
147
148 base::TimeTicks MockableTimeBackoffEntry::ImplGetTimeNow() const {
149 return time_->NowTicks();
150 }
151
139 } // namespace domain_reliability 152 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « components/domain_reliability/util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698