summaryrefslogtreecommitdiffstats
path: root/net/flip/flip_session.h
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 18:18:52 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 18:18:52 +0000
commit18c53aea21c7d839f3c39f499a2faf2c613a3fa2 (patch)
tree55cd0308aa1943d9903263043bcbe0a6ec83156c /net/flip/flip_session.h
parentbead2db06a0acf9ff82a735e8afcaef7ee601b57 (diff)
downloadchromium_src-18c53aea21c7d839f3c39f499a2faf2c613a3fa2.zip
chromium_src-18c53aea21c7d839f3c39f499a2faf2c613a3fa2.tar.gz
chromium_src-18c53aea21c7d839f3c39f499a2faf2c613a3fa2.tar.bz2
Two features:
- Enable FLIP over SSL. - Rework the X-Associated-Content. The server can send us a list of subresources that it plans to push. The client will keep track of these in a pending list. If the client tries to request the resource before the server pushes it, the client will not issue the request, and will wait until the push stream arrives. Conversely, if the pushed stream arrives before the client makes a request for the resource, the stream is added to the pushed_streams list and waits for a FlipNetworkTransaction to arrive that wants it (this part of the logic was already in place). BUG=none TEST=none Review URL: http://codereview.chromium.org/249046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip/flip_session.h')
-rw-r--r--net/flip/flip_session.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/flip/flip_session.h b/net/flip/flip_session.h
index 61a5d07..9f21b27 100644
--- a/net/flip/flip_session.h
+++ b/net/flip/flip_session.h
@@ -15,6 +15,7 @@
#include "net/base/io_buffer.h"
#include "net/base/load_states.h"
#include "net/base/net_errors.h"
+#include "net/base/ssl_config_service.h"
#include "net/base/upload_data_stream.h"
#include "net/flip/flip_framer.h"
#include "net/flip/flip_protocol.h"
@@ -141,7 +142,8 @@ class FlipSession : public base::RefCounted<FlipSession>,
void OnFin(const flip::FlipFinStreamControlFrame* frame);
// IO Callbacks
- void OnSocketConnect(int result);
+ void OnTCPConnect(int result);
+ void OnSSLConnect(int result);
void OnReadComplete(int result);
void OnWriteComplete(int result);
@@ -166,17 +168,21 @@ class FlipSession : public base::RefCounted<FlipSession>,
// Callbacks for the Flip session.
CompletionCallbackImpl<FlipSession> connect_callback_;
+ CompletionCallbackImpl<FlipSession> ssl_connect_callback_;
CompletionCallbackImpl<FlipSession> read_callback_;
CompletionCallbackImpl<FlipSession> write_callback_;
// The domain this session is connected to.
std::string domain_;
+ SSLConfig ssl_config_;
+
scoped_refptr<HttpNetworkSession> session_;
// The socket handle for this session.
ClientSocketHandle connection_;
- bool connection_started_;
+ bool connection_started_; // Is the connect process started.
+ bool connection_ready_; // Is the connection ready for use.
// The read buffer used to read data from the socket.
enum { kReadBufferSize = (4 * 1024) };
@@ -190,6 +196,9 @@ class FlipSession : public base::RefCounted<FlipSession>,
ActiveStreamMap active_streams_;
ActiveStreamList pushed_streams_;
+ // List of streams declared in X-Associated-Content headers.
+ // The key is a string representing the path of the URI being pushed.
+ std::map<std::string, FlipDelegate*> pending_streams_;
// As we gather data to be sent, we put it into the output queue.
typedef std::priority_queue<PrioritizedIOBuffer> OutputQueue;