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

Unified Diff: chrome/browser/net/load_time_stats.h

Issue 10933103: fix build break (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/load_time_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/load_time_stats.h
===================================================================
--- chrome/browser/net/load_time_stats.h (revision 156876)
+++ chrome/browser/net/load_time_stats.h (working copy)
@@ -33,6 +33,12 @@
namespace BASE_HASH_NAMESPACE {
template <>
+struct hash<const net::URLRequest*> {
+ std::size_t operator()(const net::URLRequest* value) const {
+ return reinterpret_cast<std::size_t>(value);
+ }
+};
+template <>
struct hash<const net::URLRequestContext*> {
std::size_t operator()(const net::URLRequestContext* value) const {
return reinterpret_cast<std::size_t>(value);
@@ -71,6 +77,7 @@
void OnRequestWaitStateChange(const net::URLRequest& request,
net::NetworkDelegate::RequestWaitState state);
+ void OnURLRequestDestroyed(const net::URLRequest& request);
void OnTabEvent(std::pair<int, int> render_view_id, TabEvent event);
void RegisterURLRequestContext(const net::URLRequestContext* context,
ChromeURLRequestContext::ContextType type);
@@ -82,6 +89,12 @@
// representing that renderer's load statistics.
typedef std::map<std::pair<int, int>, TabLoadStats*> TabLoadStatsMap;
+ class URLRequestStats;
+ typedef base::hash_map<const net::URLRequest*,
+ URLRequestStats*> RequestStatsMap;
+
+ // Gets RequestStats for a given request.
+ URLRequestStats* GetRequestStats(const net::URLRequest* request);
// Gets TabLoadStats for a given RenderView.
TabLoadStats* GetTabLoadStats(std::pair<int, int> render_view_id);
// Deletes TabLoadStats no longer needed for a render view.
@@ -98,6 +111,7 @@
bool is_load_done);
TabLoadStatsMap tab_load_stats_;
+ RequestStatsMap request_stats_;
std::vector<base::Histogram*> histograms_[REQUEST_STATUS_MAX][HISTOGRAM_MAX];
base::hash_set<const net::URLRequestContext*> main_request_contexts_;
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/load_time_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698