| OLD | NEW | 
|    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 #ifndef COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ |    5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ | 
|    6 #define COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ |    6 #define COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ | 
|    7  |    7  | 
|    8 #include <map> |    8 #include <map> | 
|    9  |    9  | 
|   10 #include "base/callback_forward.h" |   10 #include "base/callback_forward.h" | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   97   base::TimeTicks NowTicks() override; |   97   base::TimeTicks NowTicks() override; | 
|   98   scoped_ptr<MockableTime::Timer> CreateTimer() override; |   98   scoped_ptr<MockableTime::Timer> CreateTimer() override; | 
|   99 }; |   99 }; | 
|  100  |  100  | 
|  101 // A subclass of BackoffEntry that uses a MockableTime to keep track of time. |  101 // A subclass of BackoffEntry that uses a MockableTime to keep track of time. | 
|  102 class MockableTimeBackoffEntry : public net::BackoffEntry { |  102 class MockableTimeBackoffEntry : public net::BackoffEntry { | 
|  103  public: |  103  public: | 
|  104   MockableTimeBackoffEntry(const net::BackoffEntry::Policy* const policy, |  104   MockableTimeBackoffEntry(const net::BackoffEntry::Policy* const policy, | 
|  105                            MockableTime* time); |  105                            MockableTime* time); | 
|  106  |  106  | 
|  107   virtual ~MockableTimeBackoffEntry(); |  107   ~MockableTimeBackoffEntry() override; | 
|  108  |  108  | 
|  109  protected: |  109  protected: | 
|  110   virtual base::TimeTicks ImplGetTimeNow() const override; |  110   base::TimeTicks ImplGetTimeNow() const override; | 
|  111  |  111  | 
|  112  private: |  112  private: | 
|  113   MockableTime* time_; |  113   MockableTime* time_; | 
|  114 }; |  114 }; | 
|  115  |  115  | 
|  116 }  // namespace domain_reliability |  116 }  // namespace domain_reliability | 
|  117  |  117  | 
|  118 #endif  // COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ |  118 #endif  // COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ | 
| OLD | NEW |