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

Side by Side Diff: net/url_request/view_cache_helper.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
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/url_request/view_cache_helper.h" 5 #include "net/url_request/view_cache_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (HttpCache::ParseResponseInfo( 304 if (HttpCache::ParseResponseInfo(
305 buf_->data(), buf_len_, &response, &truncated) && 305 buf_->data(), buf_len_, &response, &truncated) &&
306 response.headers.get()) { 306 response.headers.get()) {
307 if (truncated) 307 if (truncated)
308 data_->append("<pre>RESPONSE_INFO_TRUNCATED</pre>"); 308 data_->append("<pre>RESPONSE_INFO_TRUNCATED</pre>");
309 309
310 data_->append("<hr><pre>"); 310 data_->append("<hr><pre>");
311 data_->append(EscapeForHTML(response.headers->GetStatusLine())); 311 data_->append(EscapeForHTML(response.headers->GetStatusLine()));
312 data_->push_back('\n'); 312 data_->push_back('\n');
313 313
314 void* iter = NULL; 314 size_t iter = 0;
315 std::string name, value; 315 std::string name, value;
316 while (response.headers->EnumerateHeaderLines(&iter, &name, &value)) { 316 while (response.headers->EnumerateHeaderLines(&iter, &name, &value)) {
317 data_->append(EscapeForHTML(name)); 317 data_->append(EscapeForHTML(name));
318 data_->append(": "); 318 data_->append(": ");
319 data_->append(EscapeForHTML(value)); 319 data_->append(EscapeForHTML(value));
320 data_->push_back('\n'); 320 data_->push_back('\n');
321 } 321 }
322 data_->append("</pre>"); 322 data_->append("</pre>");
323 } 323 }
324 } 324 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 entry_ = NULL; 359 entry_ = NULL;
360 } 360 }
361 return OK; 361 return OK;
362 } 362 }
363 363
364 void ViewCacheHelper::OnIOComplete(int result) { 364 void ViewCacheHelper::OnIOComplete(int result) {
365 DoLoop(result); 365 DoLoop(result);
366 } 366 }
367 367
368 } // namespace net. 368 } // namespace net.
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/websockets/websocket_stream_create_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698