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

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

Issue 2780003003: Send an event to the page load metrics to track resource starting. (Closed)
Patch Set: FREEZE.unindexed - took merge and fixed it up Created 3 years, 8 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_MEDIA_PAGE_LOAD_METRICS_OBSER VER_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_MEDIA_PAGE_LOAD_METRICS_OBSER VER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_MEDIA_PAGE_LOAD_METRICS_OBSER VER_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_MEDIA_PAGE_LOAD_METRICS_OBSER VER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 13 matching lines...) Expand all
24 MediaPageLoadMetricsObserver(); 24 MediaPageLoadMetricsObserver();
25 ~MediaPageLoadMetricsObserver() override; 25 ~MediaPageLoadMetricsObserver() override;
26 26
27 // page_load_metrics::PageLoadMetricsObserver: 27 // page_load_metrics::PageLoadMetricsObserver:
28 void OnComplete(const page_load_metrics::PageLoadTiming& timing, 28 void OnComplete(const page_load_metrics::PageLoadTiming& timing,
29 const page_load_metrics::PageLoadExtraInfo& info) override; 29 const page_load_metrics::PageLoadExtraInfo& info) override;
30 page_load_metrics::PageLoadMetricsObserver::ObservePolicy 30 page_load_metrics::PageLoadMetricsObserver::ObservePolicy
31 FlushMetricsOnAppEnterBackground( 31 FlushMetricsOnAppEnterBackground(
32 const page_load_metrics::PageLoadTiming& timing, 32 const page_load_metrics::PageLoadTiming& timing,
33 const page_load_metrics::PageLoadExtraInfo& info) override; 33 const page_load_metrics::PageLoadExtraInfo& info) override;
34 void OnLoadedResource( 34 void OnLoadedResource(const page_load_metrics::ExtraRequestCompleteInfo&
35 const page_load_metrics::ExtraRequestInfo& extra_request_info) override; 35 extra_request_complete_info) override;
36 void MediaStartedPlaying( 36 void MediaStartedPlaying(
37 const content::WebContentsObserver::MediaPlayerInfo& video_type, 37 const content::WebContentsObserver::MediaPlayerInfo& video_type,
38 bool is_in_main_frame) override; 38 bool is_in_main_frame) override;
39 39
40 private: 40 private:
41 // Records histograms for byte information. 41 // Records histograms for byte information.
42 void RecordByteHistograms(); 42 void RecordByteHistograms();
43 43
44 // The number of body (not header) prefilter bytes consumed by requests for 44 // The number of body (not header) prefilter bytes consumed by requests for
45 // the page. 45 // the page.
46 int64_t cache_bytes_; 46 int64_t cache_bytes_;
47 int64_t network_bytes_; 47 int64_t network_bytes_;
48 48
49 // Whether the page load played a media element. 49 // Whether the page load played a media element.
50 bool played_media_; 50 bool played_media_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(MediaPageLoadMetricsObserver); 52 DISALLOW_COPY_AND_ASSIGN(MediaPageLoadMetricsObserver);
53 }; 53 };
54 54
55 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_MEDIA_PAGE_LOAD_METRICS_OB SERVER_H_ 55 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_MEDIA_PAGE_LOAD_METRICS_OB SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698