summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_pool_histograms.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 04:48:53 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 04:48:53 +0000
commit81ce9f3b1eb34dc7f6954f0f6657a76b0f01fc12 (patch)
tree41b3caf1a55ba3cfa2f6cf13b0a5ce3d773d631f /net/socket/client_socket_pool_histograms.h
parent4f7f4854821e8e4933ad2c662bfd9417eb604a68 (diff)
downloadchromium_src-81ce9f3b1eb34dc7f6954f0f6657a76b0f01fc12.zip
chromium_src-81ce9f3b1eb34dc7f6954f0f6657a76b0f01fc12.tar.gz
chromium_src-81ce9f3b1eb34dc7f6954f0f6657a76b0f01fc12.tar.bz2
Use lock-free lazy initialization for static histogram references
Make all histogram macros thread safe, and fast by again using statics to achieve performance. ...at the cost of: Leak all histograms to avoid races at shutdown. Also included leak suppression for valgrind. r=rtenneti BUG=78207 Review URL: http://codereview.chromium.org/6780035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_pool_histograms.h')
-rw-r--r--net/socket/client_socket_pool_histograms.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/socket/client_socket_pool_histograms.h b/net/socket/client_socket_pool_histograms.h
index 493d34a..0e5afff 100644
--- a/net/socket/client_socket_pool_histograms.h
+++ b/net/socket/client_socket_pool_histograms.h
@@ -28,10 +28,10 @@ class ClientSocketPoolHistograms {
void AddReusedIdleTime(base::TimeDelta time) const;
private:
- scoped_refptr<base::Histogram> socket_type_;
- scoped_refptr<base::Histogram> request_time_;
- scoped_refptr<base::Histogram> unused_idle_time_;
- scoped_refptr<base::Histogram> reused_idle_time_;
+ base::Histogram* socket_type_;
+ base::Histogram* request_time_;
+ base::Histogram* unused_idle_time_;
+ base::Histogram* reused_idle_time_;
bool is_http_proxy_connection_;
bool is_socks_connection_;