1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
6 #define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
7 
8 #include "base/optional.h"
9 #include "base/time/time.h"
10 #include "components/page_load_metrics/common/page_load_metrics.mojom.h"
11 #include "third_party/blink/public/common/loader/loading_behavior_flag.h"
12 
13 namespace page_load_metrics {
14 
15 // Initialize an empty PageLoadTiming with initialized empty sub-members.
16 mojom::PageLoadTimingPtr CreatePageLoadTiming();
17 
18 bool IsEmpty(const mojom::DocumentTiming& timing);
19 bool IsEmpty(const mojom::PaintTiming& timing);
20 bool IsEmpty(const mojom::ParseTiming& timing);
21 bool IsEmpty(const mojom::PageLoadTiming& timing);
22 bool IsEmpty(const mojom::InteractiveTiming& timing);
23 
24 void InitPageLoadTimingForTest(mojom::PageLoadTiming* timing);
25 
26 }  // namespace page_load_metrics
27 
28 #endif  // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
29