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

Side by Side Diff: chrome/browser/page_load_metrics/page_load_metrics_observer.cc

Issue 2350473002: [page_load_metrics] Add support for chrome:// urls and add extensions observer (Closed)
Patch Set: fix about:blank check Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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/page_load_metrics_observer.h" 5 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h"
6 6
7 #include "content/public/browser/navigation_handle.h"
8
7 namespace page_load_metrics { 9 namespace page_load_metrics {
8 10
9 PageLoadExtraInfo::PageLoadExtraInfo( 11 PageLoadExtraInfo::PageLoadExtraInfo(
10 const base::Optional<base::TimeDelta>& first_background_time, 12 const base::Optional<base::TimeDelta>& first_background_time,
11 const base::Optional<base::TimeDelta>& first_foreground_time, 13 const base::Optional<base::TimeDelta>& first_foreground_time,
12 bool started_in_foreground, 14 bool started_in_foreground,
13 bool user_gesture, 15 bool user_gesture,
14 const GURL& committed_url, 16 const GURL& committed_url,
15 const GURL& start_url, 17 const GURL& start_url,
16 const base::Optional<base::TimeDelta>& time_to_commit, 18 const base::Optional<base::TimeDelta>& time_to_commit,
(...skipping 20 matching lines...) Expand all
37 PageLoadExtraInfo::PageLoadExtraInfo(const PageLoadExtraInfo& other) = default; 39 PageLoadExtraInfo::PageLoadExtraInfo(const PageLoadExtraInfo& other) = default;
38 40
39 PageLoadExtraInfo::~PageLoadExtraInfo() {} 41 PageLoadExtraInfo::~PageLoadExtraInfo() {}
40 42
41 FailedProvisionalLoadInfo::FailedProvisionalLoadInfo(base::TimeDelta interval, 43 FailedProvisionalLoadInfo::FailedProvisionalLoadInfo(base::TimeDelta interval,
42 net::Error error) 44 net::Error error)
43 : time_to_failed_provisional_load(interval), error(error) {} 45 : time_to_failed_provisional_load(interval), error(error) {}
44 46
45 FailedProvisionalLoadInfo::~FailedProvisionalLoadInfo() {} 47 FailedProvisionalLoadInfo::~FailedProvisionalLoadInfo() {}
46 48
49 TrackingPolicy PageLoadMetricsObserver::ShouldTrackLoad(
50 content::NavigationHandle* navigation_handle) {
51 return navigation_handle->GetURL().SchemeIsHTTPOrHTTPS() ? TRACK : IGNORE;
52 }
53
47 } // namespace page_load_metrics 54 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698