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

Unified Diff: net/spdy/hpack_huffman_aggregator.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/buffered_spdy_framer_unittest.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack_huffman_aggregator.cc
diff --git a/net/spdy/hpack_huffman_aggregator.cc b/net/spdy/hpack_huffman_aggregator.cc
index 41a3f48afc1d5a7ebbb97c633b0178b6998d756b..8080a9b3f393425d926f9b73ab3638d6dc6ad1a9 100644
--- a/net/spdy/hpack_huffman_aggregator.cc
+++ b/net/spdy/hpack_huffman_aggregator.cc
@@ -49,10 +49,8 @@ void HpackHuffmanAggregator::AggregateTransactionCharacterCounts(
if (IsCrossOrigin(request)) {
return;
}
- HostPortPair endpoint = HostPortPair(request.url.HostNoBrackets(),
- request.url.EffectiveIntPort());
- HpackEncoder* encoder = ObtainEncoder(
- SpdySessionKey(endpoint, proxy, request.privacy_mode));
+ HpackEncoder* encoder = ObtainEncoder(SpdySessionKey(
+ HostPortPair::FromURL(request.url), proxy, request.privacy_mode));
// Convert and encode the request and response header sets.
{
@@ -108,8 +106,6 @@ void HpackHuffmanAggregator::CreateSpdyHeadersFromHttpResponse(
bool HpackHuffmanAggregator::IsCrossOrigin(const HttpRequestInfo& request) {
// Require that the request is top-level, or that it shares
// an origin with its referer.
- HostPortPair endpoint = HostPortPair(request.url.HostNoBrackets(),
- request.url.EffectiveIntPort());
if ((request.load_flags & LOAD_MAIN_FRAME) == 0) {
std::string referer_str;
if (!request.extra_headers.GetHeader(HttpRequestHeaders::kReferer,
@@ -118,9 +114,8 @@ bool HpackHuffmanAggregator::IsCrossOrigin(const HttpRequestInfo& request) {
return true;
}
GURL referer(referer_str);
- HostPortPair referer_endpoint = HostPortPair(referer.HostNoBrackets(),
- referer.EffectiveIntPort());
- if (!endpoint.Equals(referer_endpoint)) {
+ if (!HostPortPair::FromURL(request.url).Equals(
+ HostPortPair::FromURL(referer))) {
// Cross-origin request.
return true;
}
« no previous file with comments | « net/spdy/buffered_spdy_framer_unittest.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698