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

Side by Side Diff: net/base/backoff_entry_unittest.cc

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment Created 6 years, 2 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
« no previous file with comments | « net/base/address_tracker_linux.h ('k') | net/base/capturing_net_log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/backoff_entry.h" 5 #include "net/base/backoff_entry.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace { 8 namespace {
9 9
10 using base::TimeDelta; 10 using base::TimeDelta;
11 using base::TimeTicks; 11 using base::TimeTicks;
12 using net::BackoffEntry; 12 using net::BackoffEntry;
13 13
14 BackoffEntry::Policy base_policy = { 0, 1000, 2.0, 0.0, 20000, 2000, false }; 14 BackoffEntry::Policy base_policy = { 0, 1000, 2.0, 0.0, 20000, 2000, false };
15 15
16 class TestBackoffEntry : public BackoffEntry { 16 class TestBackoffEntry : public BackoffEntry {
17 public: 17 public:
18 explicit TestBackoffEntry(const Policy* const policy) 18 explicit TestBackoffEntry(const Policy* const policy)
19 : BackoffEntry(policy), 19 : BackoffEntry(policy),
20 now_(TimeTicks()) { 20 now_(TimeTicks()) {
21 // Work around initialization in constructor not picking up 21 // Work around initialization in constructor not picking up
22 // fake time. 22 // fake time.
23 SetCustomReleaseTime(TimeTicks()); 23 SetCustomReleaseTime(TimeTicks());
24 } 24 }
25 25
26 virtual ~TestBackoffEntry() {} 26 virtual ~TestBackoffEntry() {}
27 27
28 virtual TimeTicks ImplGetTimeNow() const OVERRIDE { 28 virtual TimeTicks ImplGetTimeNow() const override {
29 return now_; 29 return now_;
30 } 30 }
31 31
32 void set_now(const TimeTicks& now) { 32 void set_now(const TimeTicks& now) {
33 now_ = now; 33 now_ = now;
34 } 34 }
35 35
36 private: 36 private:
37 TimeTicks now_; 37 TimeTicks now_;
38 38
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 custom.set_now(custom.ImplGetTimeNow() + custom.GetTimeUntilRelease()); 305 custom.set_now(custom.ImplGetTimeNow() + custom.GetTimeUntilRelease());
306 custom.InformOfRequest(false); 306 custom.InformOfRequest(false);
307 ASSERT_TRUE(custom.ShouldRejectRequest()); 307 ASSERT_TRUE(custom.ShouldRejectRequest());
308 } 308 }
309 309
310 // Max delay should still be respected. 310 // Max delay should still be respected.
311 EXPECT_EQ(20000, custom.GetTimeUntilRelease().InMilliseconds()); 311 EXPECT_EQ(20000, custom.GetTimeUntilRelease().InMilliseconds());
312 } 312 }
313 313
314 } // namespace 314 } // namespace
OLDNEW
« no previous file with comments | « net/base/address_tracker_linux.h ('k') | net/base/capturing_net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698