summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 20:29:45 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 20:29:45 +0000
commit9b5614aec311bc0d04416b1fa279e496cca84714 (patch)
treeef89c857a897d45a8540aa0a84252a4a9329b83a /jingle
parent4055f9a6cd7de30e99288aa1f51b42276a93e705 (diff)
downloadchromium_src-9b5614aec311bc0d04416b1fa279e496cca84714.zip
chromium_src-9b5614aec311bc0d04416b1fa279e496cca84714.tar.gz
chromium_src-9b5614aec311bc0d04416b1fa279e496cca84714.tar.bz2
Gather preconnection use vs waste statistics
I now gather statistics only in the transport socket classes TcpClientSocket*. All other socket classes forward significant data (that they are used in a speculation) to their transport class, where this data is stored, and then dumped when the TCP socket is closed. This CL also repaired a slight miscount in bytes read and written on Windows, as error codes were mistakenly accumulated as byte counts. This CL repaired a significant undercounting in linux/mac via StatsCounter (the logging counter appears correct). Libjingle support is minimal (NOTREACHED), but I don't know that there are subresources that will be speculatively preconnected from that class (and it is less obvious how the class uses underlying sockets, if at all). BUG=42694 r=willchan Review URL: http://codereview.chromium.org/3163033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle')
-rw-r--r--jingle/notifier/communicator/ssl_socket_adapter.cc8
-rw-r--r--jingle/notifier/communicator/ssl_socket_adapter.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/jingle/notifier/communicator/ssl_socket_adapter.cc b/jingle/notifier/communicator/ssl_socket_adapter.cc
index 713ea6e..8cc135d 100644
--- a/jingle/notifier/communicator/ssl_socket_adapter.cc
+++ b/jingle/notifier/communicator/ssl_socket_adapter.cc
@@ -262,6 +262,14 @@ int TransportSocket::GetPeerAddress(net::AddressList* address) const {
return net::OK;
}
+void TransportSocket::SetSubresourceSpeculation() {
+ NOTREACHED();
+}
+
+void TransportSocket::SetOmniboxSpeculation() {
+ NOTREACHED();
+}
+
int TransportSocket::Read(net::IOBuffer* buf, int buf_len,
net::CompletionCallback* callback) {
DCHECK(buf);
diff --git a/jingle/notifier/communicator/ssl_socket_adapter.h b/jingle/notifier/communicator/ssl_socket_adapter.h
index 574e135..a5f5e9a 100644
--- a/jingle/notifier/communicator/ssl_socket_adapter.h
+++ b/jingle/notifier/communicator/ssl_socket_adapter.h
@@ -42,6 +42,8 @@ class TransportSocket : public net::ClientSocket, public sigslot::has_slots<> {
virtual bool IsConnectedAndIdle() const;
virtual int GetPeerAddress(net::AddressList* address) const;
virtual const net::BoundNetLog& NetLog() const { return net_log_; }
+ virtual void SetSubresourceSpeculation();
+ virtual void SetOmniboxSpeculation();
// net::Socket implementation