diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
commit | 679147eead574d186ebf3069647b4c23e8ccace6 (patch) | |
tree | fc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/net/socket/client_socket_pool_histograms.h | |
download | qtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz |
Initial import.
Diffstat (limited to 'chromium/net/socket/client_socket_pool_histograms.h')
-rw-r--r-- | chromium/net/socket/client_socket_pool_histograms.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/chromium/net/socket/client_socket_pool_histograms.h b/chromium/net/socket/client_socket_pool_histograms.h new file mode 100644 index 00000000000..26a406362bd --- /dev/null +++ b/chromium/net/socket/client_socket_pool_histograms.h @@ -0,0 +1,46 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NET_SOCKET_CLIENT_SOCKET_POOL_HISTOGRAMS_H_ +#define NET_SOCKET_CLIENT_SOCKET_POOL_HISTOGRAMS_H_ + +#include <string> + +#include "base/memory/ref_counted.h" +#include "base/time/time.h" +#include "net/base/net_export.h" + +namespace base { +class HistogramBase; +} + +namespace net { + +class NET_EXPORT_PRIVATE ClientSocketPoolHistograms { + public: + ClientSocketPoolHistograms(const std::string& pool_name); + ~ClientSocketPoolHistograms(); + + void AddSocketType(int socket_reuse_type) const; + void AddRequestTime(base::TimeDelta time) const; + void AddUnusedIdleTime(base::TimeDelta time) const; + void AddReusedIdleTime(base::TimeDelta time) const; + void AddErrorCode(int error_code) const; + + private: + base::HistogramBase* socket_type_; + base::HistogramBase* request_time_; + base::HistogramBase* unused_idle_time_; + base::HistogramBase* reused_idle_time_; + base::HistogramBase* error_code_; + + bool is_http_proxy_connection_; + bool is_socks_connection_; + + DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolHistograms); +}; + +} // namespace net + +#endif // NET_SOCKET_CLIENT_SOCKET_POOL_HISTOGRAMS_H_ |