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

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

Issue 2560043004: [PageLoadMetrics] Record bytes usage per page (Closed)
Patch Set: Fix test Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_METRICS_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void RenderProcessGone(base::TerminationStatus status) override; 65 void RenderProcessGone(base::TerminationStatus status) override;
66 void RenderViewHostChanged(content::RenderViewHost* old_host, 66 void RenderViewHostChanged(content::RenderViewHost* old_host,
67 content::RenderViewHost* new_host) override; 67 content::RenderViewHost* new_host) override;
68 68
69 // This method is forwarded from the MetricsNavigationThrottle. 69 // This method is forwarded from the MetricsNavigationThrottle.
70 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); 70 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle);
71 71
72 // A resource request completed on the IO thread. 72 // A resource request completed on the IO thread.
73 void OnRequestComplete(content::ResourceType resource_type, 73 void OnRequestComplete(content::ResourceType resource_type,
74 bool was_cached, 74 bool was_cached,
75 int net_error); 75 int64_t raw_body_bytes,
76 base::TimeTicks creation_time);
76 77
77 // Flush any buffered metrics, as part of the metrics subsystem persisting 78 // Flush any buffered metrics, as part of the metrics subsystem persisting
78 // metrics as the application goes into the background. The application may be 79 // metrics as the application goes into the background. The application may be
79 // killed at any time after this method is invoked without further 80 // killed at any time after this method is invoked without further
80 // notification. 81 // notification.
81 void FlushMetricsOnAppEnterBackground(); 82 void FlushMetricsOnAppEnterBackground();
82 83
83 // This getter function is required for testing. 84 // This getter function is required for testing.
84 const PageLoadExtraInfo GetPageLoadExtraInfoForCommittedLoad(); 85 const PageLoadExtraInfo GetPageLoadExtraInfoForCommittedLoad();
85 86
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 148
148 // Has the MWCO observed at least one navigation? 149 // Has the MWCO observed at least one navigation?
149 bool has_navigated_; 150 bool has_navigated_;
150 151
151 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); 152 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver);
152 }; 153 };
153 154
154 } // namespace page_load_metrics 155 } // namespace page_load_metrics
155 156
156 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ 157 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698