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

Side by Side Diff: net/socket/client_socket.h

Issue 4039003: Add experimental option for TCP FastOpen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/net.gyp ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 NET_SOCKET_CLIENT_SOCKET_H_ 5 #ifndef NET_SOCKET_CLIENT_SOCKET_H_
6 #define NET_SOCKET_CLIENT_SOCKET_H_ 6 #define NET_SOCKET_CLIENT_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/socket/socket.h" 10 #include "net/socket/socket.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // reasons. This call is generally forwarded to a basic TCPClientSocket*, 62 // reasons. This call is generally forwarded to a basic TCPClientSocket*,
63 // where a UseHistory can be updated. 63 // where a UseHistory can be updated.
64 virtual void SetSubresourceSpeculation() = 0; 64 virtual void SetSubresourceSpeculation() = 0;
65 virtual void SetOmniboxSpeculation() = 0; 65 virtual void SetOmniboxSpeculation() = 0;
66 66
67 // Returns true if the underlying transport socket ever had any reads or 67 // Returns true if the underlying transport socket ever had any reads or
68 // writes. ClientSockets layered on top of transport sockets should forward 68 // writes. ClientSockets layered on top of transport sockets should forward
69 // this call to the transport socket. 69 // this call to the transport socket.
70 virtual bool WasEverUsed() const = 0; 70 virtual bool WasEverUsed() const = 0;
71 71
72 // Returns true if the underlying transport socket is using TCP FastOpen.
73 // TCP FastOpen is an experiment with sending data in the TCP SYN packet.
74 virtual bool UsingTCPFastOpen() const = 0;
75
72 protected: 76 protected:
73 // The following class is only used to gather statistics about the history of 77 // The following class is only used to gather statistics about the history of
74 // a socket. It is only instantiated and used in basic sockets, such as 78 // a socket. It is only instantiated and used in basic sockets, such as
75 // TCPClientSocket* instances. Other classes that are derived from 79 // TCPClientSocket* instances. Other classes that are derived from
76 // ClientSocket should forward any potential settings to their underlying 80 // ClientSocket should forward any potential settings to their underlying
77 // transport sockets. 81 // transport sockets.
78 class UseHistory { 82 class UseHistory {
79 public: 83 public:
80 UseHistory(); 84 UseHistory();
81 ~UseHistory(); 85 ~UseHistory();
(...skipping 28 matching lines...) Expand all
110 // Logs a SOCKET_BYTES_RECEIVED or SOCKET_BYTES_SENT event to the NetLog. 114 // Logs a SOCKET_BYTES_RECEIVED or SOCKET_BYTES_SENT event to the NetLog.
111 // Determines whether to log the received bytes or not, based on the current 115 // Determines whether to log the received bytes or not, based on the current
112 // logging level. 116 // logging level.
113 void LogByteTransfer(const BoundNetLog& net_log, NetLog::EventType event_type, 117 void LogByteTransfer(const BoundNetLog& net_log, NetLog::EventType event_type,
114 int byte_count, char* bytes) const; 118 int byte_count, char* bytes) const;
115 }; 119 };
116 120
117 } // namespace net 121 } // namespace net
118 122
119 #endif // NET_SOCKET_CLIENT_SOCKET_H_ 123 #endif // NET_SOCKET_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698