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

Unified Diff: chrome/common/page_load_metrics/test/weak_mock_timer.cc

Issue 2901383002: Buffer cross frame paint timing updates. (Closed)
Patch Set: factor WeakMockTimer into a common location. Created 3 years, 7 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: chrome/common/page_load_metrics/test/weak_mock_timer.cc
diff --git a/chrome/common/page_load_metrics/test/weak_mock_timer.cc b/chrome/common/page_load_metrics/test/weak_mock_timer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2422be1beff2a34e6b4d3c75437e2b5394b5b6f1
--- /dev/null
+++ b/chrome/common/page_load_metrics/test/weak_mock_timer.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
Charlie Harrison 2017/05/30 14:49:08 no (c)
Bryan McQuade 2017/05/30 15:30:23 done
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/page_load_metrics/test/weak_mock_timer.h"
+
+namespace page_load_metrics {
+
+WeakMockTimer::WeakMockTimer()
+ : MockTimer(false /* retain_user_task */, false /* is_repeating */) {}
+
+WeakMockTimerProvider::WeakMockTimerProvider() {}
+WeakMockTimerProvider::~WeakMockTimerProvider() {}
+
+base::MockTimer* WeakMockTimerProvider::GetMockTimer() const {
+ return timer_.get();
+}
+
+void WeakMockTimerProvider::SetMockTimer(base::WeakPtr<WeakMockTimer> timer) {
+ timer_ = timer;
+}
+
+} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698