diff options
author | bengr@google.com <bengr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 18:12:50 +0000 |
---|---|---|
committer | bengr@google.com <bengr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 18:12:50 +0000 |
commit | 61b4efcd2a24ed3862775093626247ebddc3f5f0 (patch) | |
tree | fd68ca0ecbeaa57986b44f2c1acf2e27fbf44c94 /net/base/host_port_pair.h | |
parent | c8e9110081b2fbde9954c3e88285826afce13d9f (diff) | |
download | chromium_src-61b4efcd2a24ed3862775093626247ebddc3f5f0.zip chromium_src-61b4efcd2a24ed3862775093626247ebddc3f5f0.tar.gz chromium_src-61b4efcd2a24ed3862775093626247ebddc3f5f0.tar.bz2 |
Fixed unsafe passing of command-line parameter to SpdySession
The value of --trusted-spdy-proxy (formerly --allow-spdy-proxy-push-across-origins) is now being passed to a SpdySession via HttpNetworkSession::Params. This fixes unsafe memory handling in which a stack-allocated value
was being stored in a global char* in spdy_session.cc.
BUG=
TEST=
Review URL: http://codereview.chromium.org/10169033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_port_pair.h')
-rw-r--r-- | net/base/host_port_pair.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/base/host_port_pair.h b/net/base/host_port_pair.h index ea95356..1288a44 100644 --- a/net/base/host_port_pair.h +++ b/net/base/host_port_pair.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -44,6 +44,10 @@ class NET_EXPORT HostPortPair { return host_ == other.host_ && port_ == other.port_; } + bool IsEmpty() const { + return host_.empty() && port_ == 0; + } + const std::string& host() const { return host_; } |