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

Side by Side Diff: chrome/browser/page_load_metrics/observers/reload_page_load_metrics_observer.h

Issue 2008233002: Add ReloadPageLoadMetricsObserver to have a metrics variant for reloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review #7, #8 Created 4 years, 7 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 | « no previous file | chrome/browser/page_load_metrics/observers/reload_page_load_metrics_observer.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_OBSERVERS_RELOAD_PAGE_LOAD_METRICS_OBSE RVER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_RELOAD_PAGE_LOAD_METRICS_OBSE RVER_H_
7
8 #include "base/macros.h"
9 #include "components/page_load_metrics/browser/page_load_metrics_observer.h"
10
11 namespace chrome {
12
13 // An observer class to report metrics on pages those loading were initiated
14 // by one of reload operations including hitting enter in the omnibox.
15 // This ignore JavaScript-initiated loadings by location.reload() or
16 // history.go(0).
17 class ReloadPageLoadMetricsObserver
18 : public page_load_metrics::PageLoadMetricsObserver {
19 public:
20 ReloadPageLoadMetricsObserver();
21
22 // page_load_metrics::PageLoadMetricsObserver implementation:
23 void OnCommit(content::NavigationHandle* navigation_handle) override;
24 void OnFirstContentfulPaint(
25 const page_load_metrics::PageLoadTiming& timing,
26 const page_load_metrics::PageLoadExtraInfo& extra_info) override;
27
28 private:
29 bool page_transition_was_reload_;
30 bool initiated_by_user_gesture_;
31
32 DISALLOW_COPY_AND_ASSIGN(ReloadPageLoadMetricsObserver);
33 };
34
35 } // namespace chrome
36
37 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_RELOAD_PAGE_LOAD_METRICS_O BSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/observers/reload_page_load_metrics_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698