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

Unified Diff: net/spdy/spdy_session.cc

Issue 1866983006: SHP 2: Change SpdySettingsMap to use SchemeHostPort as the key. No change to Pref data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SHP_1
Patch Set: remove commented line Created 4 years, 8 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
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index d4c6f06c08b4bb43b989c380d8c6f7d82d3f1ee6..618a78d62b9c14d9d82d77fd80ab3cb3177a63ce 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -2038,6 +2038,12 @@ base::WeakPtr<SpdyStream> SpdySession::GetActivePushStream(const GURL& url) {
return active_it->second.stream->GetWeakPtr();
}
+url::SchemeHostPort SpdySession::GetServer() {
+ return url::SchemeHostPort(is_secure_ ? "https" : "http",
Zhongyi Shi 2016/04/12 21:08:08 Need confirm: is that safe to use is_secure_ inste
Ryan Hamilton 2016/04/13 04:13:24 Looks great!
+ host_port_pair().host(),
+ host_port_pair().port());
+}
+
bool SpdySession::GetSSLInfo(SSLInfo* ssl_info,
bool* was_npn_negotiated,
NextProto* protocol_negotiated) {
@@ -2184,7 +2190,7 @@ void SpdySession::OnSettings(bool clear_persisted) {
CHECK(in_io_loop_);
if (clear_persisted)
- http_server_properties_->ClearSpdySettings(host_port_pair());
+ http_server_properties_->ClearSpdySettings(GetServer());
if (net_log_.IsCapturing()) {
net_log_.AddEvent(NetLog::TYPE_HTTP2_SESSION_RECV_SETTINGS,
@@ -2208,7 +2214,7 @@ void SpdySession::OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) {
HandleSetting(id, value);
http_server_properties_->SetSpdySetting(
- host_port_pair(),
+ GetServer(),
id,
static_cast<SpdySettingsFlags>(flags),
value);
@@ -2874,7 +2880,7 @@ void SpdySession::SendInitialData() {
// previously told us to use when communicating with them (after
// applying them).
const SettingsMap& server_settings_map =
- http_server_properties_->GetSpdySettings(host_port_pair());
+ http_server_properties_->GetSpdySettings(GetServer());
if (server_settings_map.empty())
return;
@@ -3081,7 +3087,7 @@ void SpdySession::RecordHistograms() {
if (received_settings_) {
// Enumerate the saved settings, and set histograms for it.
const SettingsMap& settings_map =
- http_server_properties_->GetSpdySettings(host_port_pair());
+ http_server_properties_->GetSpdySettings(GetServer());
SettingsMap::const_iterator it;
for (it = settings_map.begin(); it != settings_map.end(); ++it) {
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698