Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / net / quic / quic_crypto_server_stream.h
index 94c0318..09d9bd8 100644 (file)
@@ -33,15 +33,14 @@ class NET_EXPORT_PRIVATE ServerHelloNotifier : public
       : server_stream_(stream) {}
 
   // QuicAckNotifier::DelegateInterface implementation
-  virtual void OnAckNotification(
-      int num_original_packets,
-      int num_original_bytes,
-      int num_retransmitted_packets,
-      int num_retransmitted_bytes,
-      QuicTime::Delta delta_largest_observed) OVERRIDE;
+  void OnAckNotification(int num_original_packets,
+                         int num_original_bytes,
+                         int num_retransmitted_packets,
+                         int num_retransmitted_bytes,
+                         QuicTime::Delta delta_largest_observed) override;
 
  private:
-  virtual ~ServerHelloNotifier() {}
+  ~ServerHelloNotifier() override {}
 
   QuicCryptoServerStream* server_stream_;
 
@@ -52,15 +51,14 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
  public:
   QuicCryptoServerStream(const QuicCryptoServerConfig& crypto_config,
                          QuicSession* session);
-  virtual ~QuicCryptoServerStream();
+  ~QuicCryptoServerStream() override;
 
   // Cancel any outstanding callbacks, such as asynchronous validation of client
   // hello.
   void CancelOutstandingCallbacks();
 
   // CryptoFramerVisitorInterface implementation
-  virtual void OnHandshakeMessage(
-      const CryptoHandshakeMessage& message) OVERRIDE;
+  void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
 
   // GetBase64SHA256ClientChannelID sets |*output| to the base64 encoded,
   // SHA-256 hash of the client's ChannelID key and returns true, if the client
@@ -81,6 +79,9 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
   // client.
   void OnServerHelloAcked();
 
+  void set_previous_cached_network_params(
+      CachedNetworkParameters cached_network_params);
+
  protected:
   virtual QuicErrorCode ProcessClientHello(
       const CryptoHandshakeMessage& message,
@@ -92,6 +93,8 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
   // before going through the parameter negotiation step.
   virtual void OverrideQuicConfigDefaults(QuicConfig* config);
 
+  CachedNetworkParameters* get_previous_cached_network_params();
+
  private:
   friend class test::CryptoTestUtils;
 
@@ -102,8 +105,8 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
     void Cancel();
 
     // From ValidateClientHelloResultCallback
-    virtual void RunImpl(const CryptoHandshakeMessage& client_hello,
-                         const Result& result) OVERRIDE;
+    void RunImpl(const CryptoHandshakeMessage& client_hello,
+                 const Result& result) override;
 
    private:
     QuicCryptoServerStream* parent_;
@@ -123,7 +126,7 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
 
   // Pointer to the active callback that will receive the result of
   // the client hello validation request and forward it to
-  // FinishProcessingHandshakeMessage for processing.  NULL if no
+  // FinishProcessingHandshakeMessage for processing.  nullptr if no
   // handshake message is being validated.
   ValidateCallback* validate_client_hello_cb_;
 
@@ -133,6 +136,11 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
   // Number of server config update (SCUP) messages sent by this stream.
   int num_server_config_update_messages_sent_;
 
+  // If the client provides CachedNetworkParameters in the STK in the CHLO, then
+  // store here, and send back in future STKs if we have no better bandwidth
+  // estimate to send.
+  scoped_ptr<CachedNetworkParameters> previous_cached_network_params_;
+
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream);
 };