OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sync/test/engine/fake_traffic_recorder.h" |
| 6 #include "sync/util/time.h" |
| 7 |
| 8 namespace syncer { |
| 9 |
| 10 FakeTrafficRecorder::FakeTrafficRecorder( |
| 11 unsigned int max_messages, |
| 12 unsigned int max_message_size) |
| 13 : TrafficRecorder::TrafficRecorder(max_messages, max_message_size) { |
| 14 SetTime(0); |
| 15 } |
| 16 |
| 17 FakeTrafficRecorder::~FakeTrafficRecorder() { |
| 18 } |
| 19 |
| 20 base::Time FakeTrafficRecorder::GetTime() { |
| 21 return time_; |
| 22 } |
| 23 |
| 24 void FakeTrafficRecorder::SetTime(int64 time) { |
| 25 time_ = ProtoTimeToTime(time); |
| 26 } |
| 27 |
| 28 void FakeTrafficRecorder::SetTime(base::Time time) { |
| 29 time_ = time; |
| 30 } |
| 31 |
| 32 } // namespace syncer |
OLD | NEW |