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

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

Issue 2331053003: Add common page filtering logic for page load metrics. (Closed)
Patch Set: refine interface 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
(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_BROWSER_PAGE_TRACKER_PREDICATE_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACKER_PREDICATE_H_
7
8 #include "base/macros.h"
9 #include "chrome/common/page_load_metrics/page_tracker_predicate.h"
10
11 namespace content {
12 class NavigationHandle;
13 class WebContents;
14 } // namespace content
15
16 namespace page_load_metrics {
17
18 class PageLoadMetricsEmbedderInterface;
19
20 class BrowserPageTrackerPredicate : public PageTrackerPredicate {
21 public:
22 // embedder_interface, web_contents, and navigation_handle are not owned by
23 // BrowserPageTrackerPredicate, and must outlive the
24 // BrowserPageTrackerPredicate.
25 BrowserPageTrackerPredicate(
26 PageLoadMetricsEmbedderInterface* embedder_interface,
27 content::WebContents* web_contents,
28 content::NavigationHandle* navigation_handle);
29 ~BrowserPageTrackerPredicate() override;
30
31 bool HasCommitted() override;
32 bool IsHTTPOrHTTPSUrl() override;
33 bool IsNewTabPageUrl() override;
34 bool IsChromeErrorPage() override;
35 bool IsNetworkErrorPage() override;
36 bool IsHTMLOrXHTMLPage() override;
37
38 private:
39 PageLoadMetricsEmbedderInterface* const embedder_interface_;
40 content::WebContents* const web_contents_;
41 content::NavigationHandle* const navigation_handle_;
42
43 DISALLOW_COPY_AND_ASSIGN(BrowserPageTrackerPredicate);
44 };
45
46 } // namespace page_load_metrics
47
48 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACKER_PREDICATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698