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

Side by Side Diff: net/websockets/websocket_stream_create_test_base.cc

Issue 1594973004: Remove use of void** from HttpResponseHeaders::EnumerateHeaderLines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 11 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
« no previous file with comments | « net/url_request/view_cache_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/websockets/websocket_stream_create_test_base.h" 5 #include "net/websockets/websocket_stream_create_test_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 HttpRequestHeaders::Iterator it(headers); 126 HttpRequestHeaders::Iterator it(headers);
127 std::vector<HeaderKeyValuePair> result; 127 std::vector<HeaderKeyValuePair> result;
128 while (it.GetNext()) 128 while (it.GetNext())
129 result.push_back(HeaderKeyValuePair(it.name(), it.value())); 129 result.push_back(HeaderKeyValuePair(it.name(), it.value()));
130 return result; 130 return result;
131 } 131 }
132 132
133 std::vector<HeaderKeyValuePair> 133 std::vector<HeaderKeyValuePair>
134 WebSocketStreamCreateTestBase::ResponseHeadersToVector( 134 WebSocketStreamCreateTestBase::ResponseHeadersToVector(
135 const HttpResponseHeaders& headers) { 135 const HttpResponseHeaders& headers) {
136 void* iter = NULL; 136 size_t iter = 0;
137 std::string name, value; 137 std::string name, value;
138 std::vector<HeaderKeyValuePair> result; 138 std::vector<HeaderKeyValuePair> result;
139 while (headers.EnumerateHeaderLines(&iter, &name, &value)) 139 while (headers.EnumerateHeaderLines(&iter, &name, &value))
140 result.push_back(HeaderKeyValuePair(name, value)); 140 result.push_back(HeaderKeyValuePair(name, value));
141 return result; 141 return result;
142 } 142 }
143 143
144 void WebSocketStreamCreateTestBase::WaitUntilConnectDone() { 144 void WebSocketStreamCreateTestBase::WaitUntilConnectDone() {
145 connect_run_loop_.Run(); 145 connect_run_loop_.Run();
146 } 146 }
147 147
148 std::vector<std::string> WebSocketStreamCreateTestBase::NoSubProtocols() { 148 std::vector<std::string> WebSocketStreamCreateTestBase::NoSubProtocols() {
149 return std::vector<std::string>(); 149 return std::vector<std::string>();
150 } 150 }
151 151
152 } // namespace net 152 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/view_cache_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698