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

Unified Diff: components/page_load_metrics/browser/page_load_metrics_util.cc

Issue 2177743002: Migrate page_load_metrics out of components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: migrate page_load_metrics_messages to common message generator Created 4 years, 5 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: components/page_load_metrics/browser/page_load_metrics_util.cc
diff --git a/components/page_load_metrics/browser/page_load_metrics_util.cc b/components/page_load_metrics/browser/page_load_metrics_util.cc
deleted file mode 100644
index f12ac2485f932f80b8e422294508907566dffab4..0000000000000000000000000000000000000000
--- a/components/page_load_metrics/browser/page_load_metrics_util.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015 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 "components/page_load_metrics/browser/page_load_metrics_util.h"
-
-#include <algorithm>
-
-#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
-#include "components/page_load_metrics/common/page_load_timing.h"
-
-namespace page_load_metrics {
-
-bool WasStartedInForegroundOptionalEventInForeground(
- const base::Optional<base::TimeDelta>& event,
- const PageLoadExtraInfo& info) {
- return info.started_in_foreground && event &&
- (!info.first_background_time ||
- event.value() <= info.first_background_time.value());
-}
-
-bool WasParseInForeground(const base::Optional<base::TimeDelta>& parse_start,
- const base::Optional<base::TimeDelta>& parse_stop,
- const PageLoadExtraInfo& info) {
- if (!parse_start) {
- return false;
- }
- const bool incomplete_parse_in_foreground =
- !parse_stop && info.started_in_foreground && !info.first_background_time;
-
- return incomplete_parse_in_foreground ||
- WasStartedInForegroundOptionalEventInForeground(parse_stop, info);
-}
-} // namespace page_load_metrics
« no previous file with comments | « components/page_load_metrics/browser/page_load_metrics_util.h ('k') | components/page_load_metrics/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698