commit | ee78e4960f315f1432a1c45037f86875e5cf7f31 | [log] [tgz] |
---|---|---|
author | tzik <[email protected]> | Fri Apr 13 12:25:46 2018 |
committer | Commit Bot <[email protected]> | Fri Apr 13 12:25:46 2018 |
tree | 7203911c9a95b6338ae29a743d70f5c80cd0a564 | |
parent | 06ca303bc30849d0b3886d39e8fe58322f2c381f [diff] [blame] |
Convert base::Clock::Now() a const method This method should be a const method to be consistent to NowTicks() in base::TickClock, which is also converted to a const method at http://crrev.com/821f0e338ebbe420 Bug: 789079 Change-Id: I6b5c9bcee2d730214298ae7a7136ea6b312ad079 Reviewed-on: https://chromium-review.googlesource.com/1001213 Commit-Queue: Taiju Tsuiki <[email protected]> Reviewed-by: Helen Li <[email protected]> Reviewed-by: Gabriel Charette <[email protected]> Reviewed-by: Jochen Eisinger <[email protected]> Cr-Commit-Position: refs/heads/master@{#550598}
diff --git a/components/gcm_driver/gcm_client_impl_unittest.cc b/components/gcm_driver/gcm_client_impl_unittest.cc index 85a8b6f..b2f77a88 100644 --- a/components/gcm_driver/gcm_client_impl_unittest.cc +++ b/components/gcm_driver/gcm_client_impl_unittest.cc
@@ -181,14 +181,14 @@ explicit AutoAdvancingTestClock(base::TimeDelta auto_increment_time_delta); ~AutoAdvancingTestClock() override; - base::Time Now() override; + base::Time Now() const override; void Advance(TimeDelta delta); int call_count() const { return call_count_; } private: - int call_count_; + mutable int call_count_; base::TimeDelta auto_increment_time_delta_; - base::Time now_; + mutable base::Time now_; DISALLOW_COPY_AND_ASSIGN(AutoAdvancingTestClock); }; @@ -201,7 +201,7 @@ AutoAdvancingTestClock::~AutoAdvancingTestClock() { } -base::Time AutoAdvancingTestClock::Now() { +base::Time AutoAdvancingTestClock::Now() const { call_count_++; now_ += auto_increment_time_delta_; return now_;