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

Unified Diff: chrome/renderer/page_load_metrics/fake_page_timing_sender.cc

Issue 2823523003: [Page Load Metrics] PageLoadMetrics Mojofication. (Closed)
Patch Set: Add Finch trial check and rebase Created 3 years, 8 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/renderer/page_load_metrics/fake_page_timing_sender.cc
diff --git a/chrome/renderer/page_load_metrics/fake_page_timing_sender.cc b/chrome/renderer/page_load_metrics/fake_page_timing_sender.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6ac160502c72d26496d99d28e65e456d22530dd5
--- /dev/null
+++ b/chrome/renderer/page_load_metrics/fake_page_timing_sender.cc
@@ -0,0 +1,23 @@
+// 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/renderer/page_load_metrics/fake_page_timing_sender.h"
+
+#include "base/run_loop.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace page_load_metrics {
+
+FakePageTimingSender::FakePageTimingSender() {}
+
+FakePageTimingSender::~FakePageTimingSender() {}
+
+void FakePageTimingSender::SendTiming(const PageLoadTiming& timing,
+ const PageLoadMetadata& metadata) {
+ ASSERT_TRUE(page_load_metrics_ptr_);
+ page_load_metrics_ptr_->UpdateTiming(timing, metadata);
+ base::RunLoop().RunUntilIdle();
+}
+
+} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698