OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/page_load_metrics/observers/service_worker_page_load_me
trics_observer.h" | 5 #include "chrome/browser/page_load_metrics/observers/service_worker_page_load_me
trics_observer.h" |
6 | 6 |
7 #include "components/page_load_metrics/browser/page_load_metrics_util.h" | 7 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" |
8 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" | 8 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" |
9 | 9 |
10 namespace internal { | 10 namespace internal { |
11 | 11 |
12 const char kHistogramServiceWorkerFirstContentfulPaint[] = | 12 const char kHistogramServiceWorkerFirstContentfulPaint[] = |
13 "PageLoad.Clients.ServiceWorker.PaintTiming." | 13 "PageLoad.Clients.ServiceWorker.PaintTiming." |
14 "NavigationToFirstContentfulPaint"; | 14 "NavigationToFirstContentfulPaint"; |
15 const char kBackgroundHistogramServiceWorkerFirstContentfulPaint[] = | 15 const char kBackgroundHistogramServiceWorkerFirstContentfulPaint[] = |
16 "PageLoad.Clients.ServiceWorker.PaintTiming." | 16 "PageLoad.Clients.ServiceWorker.PaintTiming." |
17 "NavigationToFirstContentfulPaint.Background"; | 17 "NavigationToFirstContentfulPaint.Background"; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 if (!WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, | 109 if (!WasStartedInForegroundOptionalEventInForeground(timing.load_event_start, |
110 info)) | 110 info)) |
111 return; | 111 return; |
112 PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerLoad, | 112 PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerLoad, |
113 timing.load_event_start.value()); | 113 timing.load_event_start.value()); |
114 if (IsInboxSite(info.committed_url)) { | 114 if (IsInboxSite(info.committed_url)) { |
115 PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerLoadInbox, | 115 PAGE_LOAD_HISTOGRAM(internal::kHistogramServiceWorkerLoadInbox, |
116 timing.load_event_start.value()); | 116 timing.load_event_start.value()); |
117 } | 117 } |
118 } | 118 } |
OLD | NEW |