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

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

Issue 2028953002: Deprecate NavigationToFirstContentfulPaint.UserGesture reload variant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_RELOAD_PAGE_LOAD_METRICS_OBSE RVER_H_ 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_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_RELOAD_PAGE_LOAD_METRICS_OBSE RVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" 9 #include "components/page_load_metrics/browser/page_load_metrics_observer.h"
10 10
11 namespace chrome { 11 namespace chrome {
12 12
13 // An observer class to report metrics on pages those loading were initiated 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. 14 // by one of reload operations including hitting enter in the omnibox.
15 // This ignore JavaScript-initiated loadings by location.reload() or 15 // This ignore JavaScript-initiated loadings by location.reload() or
16 // history.go(0). 16 // history.go(0), and loadings triggered by <meta http-equiv="refresh">.
17 class ReloadPageLoadMetricsObserver 17 class ReloadPageLoadMetricsObserver
18 : public page_load_metrics::PageLoadMetricsObserver { 18 : public page_load_metrics::PageLoadMetricsObserver {
19 public: 19 public:
20 ReloadPageLoadMetricsObserver(); 20 ReloadPageLoadMetricsObserver();
21 21
22 // page_load_metrics::PageLoadMetricsObserver implementation: 22 // page_load_metrics::PageLoadMetricsObserver implementation:
23 void OnCommit(content::NavigationHandle* navigation_handle) override; 23 void OnCommit(content::NavigationHandle* navigation_handle) override;
24 void OnFirstContentfulPaint( 24 void OnFirstContentfulPaint(
25 const page_load_metrics::PageLoadTiming& timing, 25 const page_load_metrics::PageLoadTiming& timing,
26 const page_load_metrics::PageLoadExtraInfo& extra_info) override; 26 const page_load_metrics::PageLoadExtraInfo& extra_info) override;
27 27
28 private: 28 private:
29 bool page_transition_was_reload_; 29 bool page_transition_was_reload_;
30 bool initiated_by_user_gesture_;
31 30
32 DISALLOW_COPY_AND_ASSIGN(ReloadPageLoadMetricsObserver); 31 DISALLOW_COPY_AND_ASSIGN(ReloadPageLoadMetricsObserver);
33 }; 32 };
34 33
35 } // namespace chrome 34 } // namespace chrome
36 35
37 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_RELOAD_PAGE_LOAD_METRICS_O BSERVER_H_ 36 #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