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

Side by Side Diff: content/shell/browser/shell_devtools_frontend.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_devtools_frontend.h" 5 #include "content/shell/browser/shell_devtools_frontend.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 DCHECK(source); 286 DCHECK(source);
287 PendingRequestsMap::iterator it = pending_requests_.find(source); 287 PendingRequestsMap::iterator it = pending_requests_.find(source);
288 DCHECK(it != pending_requests_.end()); 288 DCHECK(it != pending_requests_.end());
289 289
290 base::DictionaryValue response; 290 base::DictionaryValue response;
291 base::DictionaryValue* headers = new base::DictionaryValue(); 291 base::DictionaryValue* headers = new base::DictionaryValue();
292 net::HttpResponseHeaders* rh = source->GetResponseHeaders(); 292 net::HttpResponseHeaders* rh = source->GetResponseHeaders();
293 response.SetInteger("statusCode", rh ? rh->response_code() : 200); 293 response.SetInteger("statusCode", rh ? rh->response_code() : 200);
294 response.Set("headers", headers); 294 response.Set("headers", headers);
295 295
296 void* iterator = NULL; 296 size_t iterator = 0;
297 std::string name; 297 std::string name;
298 std::string value; 298 std::string value;
299 while (rh && rh->EnumerateHeaderLines(&iterator, &name, &value)) 299 while (rh && rh->EnumerateHeaderLines(&iterator, &name, &value))
300 headers->SetString(name, value); 300 headers->SetString(name, value);
301 301
302 SendMessageAck(it->second, &response); 302 SendMessageAck(it->second, &response);
303 pending_requests_.erase(it); 303 pending_requests_.erase(it);
304 delete source; 304 delete source;
305 } 305 }
306 306
(...skipping 27 matching lines...) Expand all
334 CallClientFunction("DevToolsAPI.embedderMessageAck", 334 CallClientFunction("DevToolsAPI.embedderMessageAck",
335 &id_value, arg, nullptr); 335 &id_value, arg, nullptr);
336 } 336 }
337 337
338 void ShellDevToolsFrontend::AgentHostClosed( 338 void ShellDevToolsFrontend::AgentHostClosed(
339 DevToolsAgentHost* agent_host, bool replaced) { 339 DevToolsAgentHost* agent_host, bool replaced) {
340 frontend_shell_->Close(); 340 frontend_shell_->Close();
341 } 341 }
342 342
343 } // namespace content 343 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698