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

Unified Diff: net/http/disk_cache_based_quic_server_info.cc

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: net/http/disk_cache_based_quic_server_info.cc
diff --git a/net/http/disk_cache_based_quic_server_info.cc b/net/http/disk_cache_based_quic_server_info.cc
index 91625bc973cec0eee0174c9348fd858d127212f2..85318dde8dc46fa1b56488753c4ddea21a999217 100644
--- a/net/http/disk_cache_based_quic_server_info.cc
+++ b/net/http/disk_cache_based_quic_server_info.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/logging.h"
+#include "base/strings/string_number_conversions.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -44,8 +45,9 @@ struct DiskCacheBasedQuicServerInfo::CacheOperationDataShim {
DiskCacheBasedQuicServerInfo::DiskCacheBasedQuicServerInfo(
const std::string& hostname,
+ uint16 port,
HttpCache* http_cache)
- : QuicServerInfo(hostname),
+ : QuicServerInfo(hostname, port),
weak_factory_(this),
data_shim_(new CacheOperationDataShim()),
io_callback_(
@@ -56,6 +58,7 @@ DiskCacheBasedQuicServerInfo::DiskCacheBasedQuicServerInfo(
ready_(false),
found_entry_(false),
hostname_(hostname),
+ port_(port),
http_cache_(http_cache),
backend_(NULL),
entry_(NULL) {
@@ -113,7 +116,7 @@ DiskCacheBasedQuicServerInfo::~DiskCacheBasedQuicServerInfo() {
}
std::string DiskCacheBasedQuicServerInfo::key() const {
- return "quicserverinfo:" + hostname_;
+ return "quicserverinfo:" + hostname_ + "/" + base::UintToString(port_);
Ryan Hamilton 2014/03/10 20:57:33 nit: what do you think about ":" instead of "/"?
ramant (doing other things) 2014/03/11 00:48:50 Done.
}
void DiskCacheBasedQuicServerInfo::OnIOComplete(CacheOperationDataShim* unused,

Powered by Google App Engine
This is Rietveld 408576698