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

Side by Side Diff: chrome/browser/page_load_metrics/metrics_navigation_throttle.h

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on #408334 Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_NAVIGATION_THROTTLE_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_NAVIGATION_THROTTLE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "content/public/browser/navigation_throttle.h"
12
13 namespace page_load_metrics {
14
15 // This class is used to forward calls to the MetricsWebContentsObserver.
16 // Namely, WillStartRequest() is called on NavigationThrottles, but not on
17 // WebContentsObservers. Data from the NavigationHandle accessed at this point
18 // is used to obtain more reliable abort metrics (like page transition type).
nasko 2016/08/01 15:29:22 Based on some poking I've done on separate CLs I'v
Charlie Harrison 2016/08/01 17:42:19 It is generally correct. There are some gotchas ar
19 class MetricsNavigationThrottle : public content::NavigationThrottle {
20 public:
21 static std::unique_ptr<content::NavigationThrottle> Create(
22 content::NavigationHandle* handle);
23 ~MetricsNavigationThrottle() override;
24
25 // content::NavigationThrottle:
26 content::NavigationThrottle::ThrottleCheckResult WillStartRequest() override;
27
28 private:
29 explicit MetricsNavigationThrottle(content::NavigationHandle* handle);
30
31 DISALLOW_COPY_AND_ASSIGN(MetricsNavigationThrottle);
32 };
33
34 } // namespace page_load_metrics
35
36 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_NAVIGATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698