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

Unified Diff: sync/test/engine/fake_traffic_recorder.cc

Issue 12088080: [Sync] Add timestamp to TrafficRecorder records (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sync/test/engine/fake_traffic_recorder.cc
diff --git a/sync/test/engine/fake_traffic_recorder.cc b/sync/test/engine/fake_traffic_recorder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9170917aa0c0004080e594531f5356c39623d90e
--- /dev/null
+++ b/sync/test/engine/fake_traffic_recorder.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sync/test/engine/fake_traffic_recorder.h"
+#include "sync/util/time.h"
+
+namespace syncer {
+
+FakeTrafficRecorder::FakeTrafficRecorder(
+ unsigned int max_messages,
+ unsigned int max_message_size)
+ : TrafficRecorder::TrafficRecorder(max_messages, max_message_size) {
+ SetTime(0);
+}
+
+FakeTrafficRecorder::~FakeTrafficRecorder() {
+}
+
+base::Time FakeTrafficRecorder::GetTime() {
+ return time_;
+}
+
+void FakeTrafficRecorder::SetTime(int64 time) {
+ time_ = ProtoTimeToTime(time);
+}
+
+void FakeTrafficRecorder::SetTime(base::Time time) {
+ time_ = time;
+}
+
+} // namespace syncer
« sync/test/engine/fake_traffic_recorder.h ('K') | « sync/test/engine/fake_traffic_recorder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698