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

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

Issue 2331053003: Add common page filtering logic for page load metrics. (Closed)
Patch Set: fix method names to be consistent with style guide 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/page_load_metrics/browser_page_track_decider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TRACK_DECIDER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACK_DECIDER_H_
7
8 #include "base/macros.h"
9 #include "chrome/common/page_load_metrics/page_track_decider.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 BrowserPageTrackDecider : public PageTrackDecider {
21 public:
22 // embedder_interface, web_contents, and navigation_handle are not owned by
23 // BrowserPageTrackDecider, and must outlive the
24 // BrowserPageTrackDecider.
25 BrowserPageTrackDecider(PageLoadMetricsEmbedderInterface* embedder_interface,
26 content::WebContents* web_contents,
27 content::NavigationHandle* navigation_handle);
28 ~BrowserPageTrackDecider() override;
29
30 bool HasCommitted() override;
31 bool IsHttpOrHttpsUrl() override;
32 bool IsNewTabPageUrl() override;
33 bool IsChromeErrorPage() override;
34 bool IsHtmlOrXhtmlPage() override;
35 int GetHttpStatusCode() override;
36
37 private:
38 PageLoadMetricsEmbedderInterface* const embedder_interface_;
39 content::WebContents* const web_contents_;
40 content::NavigationHandle* const navigation_handle_;
41
42 DISALLOW_COPY_AND_ASSIGN(BrowserPageTrackDecider);
43 };
44
45 } // namespace page_load_metrics
46
47 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACK_DECIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/page_load_metrics/browser_page_track_decider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698