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

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

Issue 2901383002: Buffer cross frame paint timing updates. (Closed)
Patch Set: address comment 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..0fe222af8126d82093eb8f7c0da0d66d7250750b
--- /dev/null
+++ b/chrome/common/page_load_metrics/test/weak_mock_timer.cc
@@ -0,0 +1,25 @@
+// Copyright 2017 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 "chrome/common/page_load_metrics/test/weak_mock_timer.h"
+
+namespace page_load_metrics {
+namespace test {
+
+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 test
+} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698