Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / net / tools / quic / quic_client_session.h
index a73d721..bb64145 100644 (file)
@@ -9,30 +9,36 @@
 
 #include <string>
 
+#include "base/basictypes.h"
+#include "net/quic/quic_client_session_base.h"
 #include "net/quic/quic_crypto_client_stream.h"
 #include "net/quic/quic_protocol.h"
-#include "net/quic/quic_session.h"
-#include "net/tools/quic/quic_reliable_client_stream.h"
+#include "net/tools/quic/quic_spdy_client_stream.h"
 
 namespace net {
 
 class QuicConnection;
+class QuicServerId;
 class ReliableQuicStream;
 
 namespace tools {
 
-class QuicReliableClientStream;
-
-class QuicClientSession : public QuicSession {
+class QuicClientSession : public QuicClientSessionBase {
  public:
-  QuicClientSession(const std::string& server_hostname,
-                    const QuicConfig& config,
-                    QuicConnection* connection,
-                    QuicCryptoClientConfig* crypto_config);
+  QuicClientSession(const QuicConfig& config, QuicConnection* connection);
   virtual ~QuicClientSession();
 
+  // QuicClientSessionBase methods:
+  virtual void OnProofValid(
+      const QuicCryptoClientConfig::CachedState& cached) OVERRIDE;
+  virtual void OnProofVerifyDetailsAvailable(
+      const ProofVerifyDetails& verify_details) OVERRIDE;
+
+  void InitializeSession(const QuicServerId& server_id,
+                         QuicCryptoClientConfig* config);
+
   // QuicSession methods:
-  virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE;
+  virtual QuicSpdyClientStream* CreateOutgoingDataStream() OVERRIDE;
   virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE;
 
   // Performs a crypto handshake with the server. Returns true if the crypto
@@ -46,11 +52,10 @@ class QuicClientSession : public QuicSession {
 
  protected:
   // QuicSession methods:
-  virtual ReliableQuicStream* CreateIncomingReliableStream(
-      QuicStreamId id) OVERRIDE;
+  virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) OVERRIDE;
 
  private:
-  QuicCryptoClientStream crypto_stream_;
+  scoped_ptr<QuicCryptoClientStream> crypto_stream_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
 };