summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_stream_factory.h
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-14 06:33:25 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-14 06:33:25 +0000
commit1cd2a5fa83b15a7f60c421dbedfe3e91c14fdb5c (patch)
tree5a0b33448f65b1fbb0eca65a77a75c4e93b80883 /net/quic/quic_stream_factory.h
parent82791e0818dfa575391a3ea87686704055913501 (diff)
downloadchromium_src-1cd2a5fa83b15a7f60c421dbedfe3e91c14fdb5c.zip
chromium_src-1cd2a5fa83b15a7f60c421dbedfe3e91c14fdb5c.tar.gz
chromium_src-1cd2a5fa83b15a7f60c421dbedfe3e91c14fdb5c.tar.bz2
Expire broken QUIC A-P mappings after some interval with backoff.
BUG=230030 Review URL: https://codereview.chromium.org/199223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_stream_factory.h')
-rw-r--r--net/quic/quic_stream_factory.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index 57017ee..8d49279 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -5,6 +5,7 @@
#ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_
#define NET_QUIC_QUIC_STREAM_FACTORY_H_
+#include <list>
#include <map>
#include <string>
#include <vector>
@@ -221,6 +222,9 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
const QuicSessionKey& session_key,
QuicCryptoClientConfig* crypto_config);
+ void ExpireBrokenAlternateProtocolMappings();
+ void ScheduleBrokenAlternateProtocolMappingsExpiration();
+
bool require_confirmation_;
HostResolver* host_resolver_;
ClientSocketFactory* client_socket_factory_;
@@ -263,6 +267,21 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
// ".googlevideo.com") of canoncial hostnames.
std::vector<std::string> canoncial_suffixes_;
+
+ // List of broken host:ports and the times when they can be expired.
+ struct BrokenAlternateProtocolEntry {
+ HostPortPair origin;
+ base::TimeTicks when;
+ };
+ typedef std::list<BrokenAlternateProtocolEntry>
+ BrokenAlternateProtocolList;
+ BrokenAlternateProtocolList broken_alternate_protocol_list_;
+
+ // Map from host:port to the number of times alternate protocol has
+ // been marked broken.
+ typedef std::map<HostPortPair, int> BrokenAlternateProtocolMap;
+ BrokenAlternateProtocolMap broken_alternate_protocol_map_;
+
QuicConfig config_;
JobMap active_jobs_;