diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 21:20:40 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 21:20:40 +0000 |
commit | c8b4944b44f10dc92209737015d81ca5eac9c1e7 (patch) | |
tree | 1caaf27e7ba2bb722f53ba2981efe6b2e24b0103 /net | |
parent | b8bdc7b6f21c232c6183b560d6de3717304e4503 (diff) | |
download | chromium_src-c8b4944b44f10dc92209737015d81ca5eac9c1e7.zip chromium_src-c8b4944b44f10dc92209737015d81ca5eac9c1e7.tar.gz chromium_src-c8b4944b44f10dc92209737015d81ca5eac9c1e7.tar.bz2 |
Fix Coverity defects in the FLIP code.
CID=6816 PASS_BY_VALUE
CID=6817 PASS_BY_VALUE
CID=7523 UNINIT_CTOR
R=mbelshe
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/392012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/flip/flip_io_buffer.h | 2 | ||||
-rw-r--r-- | net/flip/flip_session.cc | 4 | ||||
-rw-r--r-- | net/flip/flip_session.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/net/flip/flip_io_buffer.h b/net/flip/flip_io_buffer.h index c7b6155..ce3d6367 100644 --- a/net/flip/flip_io_buffer.h +++ b/net/flip/flip_io_buffer.h @@ -29,7 +29,7 @@ class FlipIOBuffer { position_(++order_), stream_(stream) { } - FlipIOBuffer() : priority_(0), stream_(NULL) {} + FlipIOBuffer() : priority_(0), position_(0), stream_(NULL) {} // Accessors. IOBuffer* buffer() const { return buffer_; } diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc index b777bed..9a1a1c7 100644 --- a/net/flip/flip_session.cc +++ b/net/flip/flip_session.cc @@ -28,7 +28,7 @@ namespace net { // static bool FlipSession::use_ssl_ = true; -FlipSession::FlipSession(std::string host, HttpNetworkSession* session) +FlipSession::FlipSession(const std::string& host, HttpNetworkSession* session) : ALLOW_THIS_IN_INITIALIZER_LIST( connect_callback_(this, &FlipSession::OnTCPConnect)), ALLOW_THIS_IN_INITIALIZER_LIST( @@ -551,7 +551,7 @@ void FlipSession::DeactivateStream(flip::FlipStreamId id) { active_streams_.erase(id); } -FlipStream* FlipSession::GetPushStream(std::string path) { +FlipStream* FlipSession::GetPushStream(const std::string& path) { static StatsCounter used_push_streams("flip.claimed_push_streams"); LOG(INFO) << "Looking for push stream: " << path; diff --git a/net/flip/flip_session.h b/net/flip/flip_session.h index d3adfca..f381b20 100644 --- a/net/flip/flip_session.h +++ b/net/flip/flip_session.h @@ -125,7 +125,7 @@ class FlipSession : public base::RefCounted<FlipSession>, // Create a new FlipSession. // |host| is the hostname that this session connects to. - FlipSession(std::string host, HttpNetworkSession* session); + FlipSession(const std::string& host, HttpNetworkSession* session); // Closes all open streams. Used as part of shutdown. void CloseAllStreams(net::Error code); @@ -171,7 +171,7 @@ class FlipSession : public base::RefCounted<FlipSession>, // Check if we have a pending pushed-stream for this url // Returns the stream if found (and returns it from the pending // list), returns NULL otherwise. - FlipStream* GetPushStream(std::string url); + FlipStream* GetPushStream(const std::string& url); // Callbacks for the Flip session. CompletionCallbackImpl<FlipSession> connect_callback_; |