blob: 913b141f2d3815776fa74efc4c691f5db056dcaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// 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 EventOccurredInForeground(base::TimeDelta event,
const PageLoadExtraInfo& info) {
return info.started_in_foreground && !event.is_zero() &&
(info.first_background_time.is_zero() ||
event < info.first_background_time);
}
} // namespace page_load_metrics
|