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

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: git sync 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 4358e61c111a5a698bd20617f81a88be2c770d38..7d6c8a3bd4fb0ceb5060c63c43f31bbecf024514 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -2045,6 +2045,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",
+ host_port_pair().host(),
+ host_port_pair().port());
+}
+
bool SpdySession::GetSSLInfo(SSLInfo* ssl_info,
bool* was_npn_negotiated,
NextProto* protocol_negotiated) {
@@ -2191,7 +2197,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,
@@ -2215,7 +2221,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);
@@ -2881,7 +2887,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;
@@ -3088,7 +3094,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