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

Side by Side Diff: chrome/browser/page_load_metrics/metrics_web_contents_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 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 content::RenderViewHost* new_host) override; 68 content::RenderViewHost* new_host) override;
69 void MediaStartedPlaying( 69 void MediaStartedPlaying(
70 const content::WebContentsObserver::MediaPlayerInfo& video_type, 70 const content::WebContentsObserver::MediaPlayerInfo& video_type,
71 const content::WebContentsObserver::MediaPlayerId& id) override; 71 const content::WebContentsObserver::MediaPlayerId& id) override;
72 72
73 // These methods are forwarded from the MetricsNavigationThrottle. 73 // These methods are forwarded from the MetricsNavigationThrottle.
74 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); 74 void WillStartNavigationRequest(content::NavigationHandle* navigation_handle);
75 void WillProcessNavigationResponse( 75 void WillProcessNavigationResponse(
76 content::NavigationHandle* navigation_handle); 76 content::NavigationHandle* navigation_handle);
77 77
78 // A resource request started on the IO thread. This method is invoked on
79 // the UI thread.
80 void OnRequestStarted(const content::GlobalRequestID& request_id,
81 content::ResourceType resource_type,
82 base::TimeTicks creation_time);
83
78 // A resource request completed on the IO thread. This method is invoked on 84 // A resource request completed on the IO thread. This method is invoked on
79 // the UI thread. 85 // the UI thread.
80 void OnRequestComplete( 86 void OnRequestComplete(
81 const content::GlobalRequestID& request_id, 87 const content::GlobalRequestID& request_id,
82 content::ResourceType resource_type, 88 content::ResourceType resource_type,
83 bool was_cached, 89 bool was_cached,
84 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> 90 std::unique_ptr<data_reduction_proxy::DataReductionProxyData>
85 data_reduction_proxy_data, 91 data_reduction_proxy_data,
86 int64_t raw_body_bytes, 92 int64_t raw_body_bytes,
87 int64_t original_content_length, 93 int64_t original_content_length,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 181
176 // Has the MWCO observed at least one navigation? 182 // Has the MWCO observed at least one navigation?
177 bool has_navigated_; 183 bool has_navigated_;
178 184
179 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); 185 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver);
180 }; 186 };
181 187
182 } // namespace page_load_metrics 188 } // namespace page_load_metrics
183 189
184 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ 190 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698