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

Side by Side Diff: net/spdy/spdy_stream_test_util.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_write_queue_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_stream_test_util.h" 5 #include "net/spdy/spdy_stream_test_util.h"
6 6
7 #include "net/base/completion_callback.h" 7 #include "net/base/completion_callback.h"
8 #include "net/spdy/spdy_stream.h" 8 #include "net/spdy/spdy_stream.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 int StreamDelegateBase::WaitForClose() { 95 int StreamDelegateBase::WaitForClose() {
96 int result = callback_.WaitForResult(); 96 int result = callback_.WaitForResult();
97 EXPECT_TRUE(!stream_.get()); 97 EXPECT_TRUE(!stream_.get());
98 return result; 98 return result;
99 } 99 }
100 100
101 std::string StreamDelegateBase::GetResponseHeaderValue( 101 std::string StreamDelegateBase::GetResponseHeaderValue(
102 const std::string& name) const { 102 const std::string& name) const {
103 SpdyHeaderBlock::const_iterator it = response_.find(name); 103 SpdyHeaderBlock::const_iterator it = response_.find(name);
104 return (it == response_.end()) ? "" : it->second; 104 return (it == response_.end()) ? std::string() : it->second;
105 } 105 }
106 106
107 StreamDelegateSendImmediate::StreamDelegateSendImmediate( 107 StreamDelegateSendImmediate::StreamDelegateSendImmediate(
108 const scoped_refptr<SpdyStream>& stream, 108 const scoped_refptr<SpdyStream>& stream,
109 scoped_ptr<SpdyHeaderBlock> headers, 109 scoped_ptr<SpdyHeaderBlock> headers,
110 base::StringPiece data) 110 base::StringPiece data)
111 : StreamDelegateBase(stream), 111 : StreamDelegateBase(stream),
112 headers_(headers.Pass()), 112 headers_(headers.Pass()),
113 data_(data) {} 113 data_(data) {}
114 114
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 // Check if the entire body data has been sent. 176 // Check if the entire body data has been sent.
177 *eof = (buf_->BytesRemaining() == 0); 177 *eof = (buf_->BytesRemaining() == 0);
178 return status; 178 return status;
179 } 179 }
180 180
181 } // namespace test 181 } // namespace test
182 182
183 } // namespace net 183 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/spdy/spdy_write_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698