From 33c282f0e299b711f0f18f1222ead28a7623cbbd Mon Sep 17 00:00:00 2001 From: "olli.raula" Date: Thu, 21 Jan 2016 04:12:49 -0800 Subject: Remove use of void** from HttpResponseHeaders::EnumerateHeaderLines Remove use of of obaque void** and use instead size_t* parameter. Logic inside is untouched. TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1594973004 Cr-Commit-Position: refs/heads/master@{#370672} --- .../api/declarative_webrequest/webrequest_condition_attribute.cc | 2 +- extensions/browser/api/mime_handler_private/mime_handler_private.cc | 2 +- extensions/browser/api/web_request/web_request_api_helpers.cc | 4 ++-- extensions/browser/api/web_request/web_request_event_details.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'extensions/browser/api') diff --git a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc index 1e85b1c..f9ef6752 100644 --- a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc +++ b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc @@ -694,7 +694,7 @@ bool WebRequestConditionAttributeResponseHeaders::IsFulfilled( bool passed = false; // Did some header pass TestNameValue? std::string name; std::string value; - void* iter = NULL; + size_t iter = 0; while (!passed && headers->EnumerateHeaderLines(&iter, &name, &value)) { passed |= header_matcher_->TestNameValue(name, value); } diff --git a/extensions/browser/api/mime_handler_private/mime_handler_private.cc b/extensions/browser/api/mime_handler_private/mime_handler_private.cc index 4a5bb42..120363c 100644 --- a/extensions/browser/api/mime_handler_private/mime_handler_private.cc +++ b/extensions/browser/api/mime_handler_private/mime_handler_private.cc @@ -24,7 +24,7 @@ mojo::Map CreateResponseHeadersMap( if (!headers) return mojo::Map::From(result); - void* iter = nullptr; + size_t iter = 0; std::string header_name; std::string header_value; while (headers->EnumerateHeaderLines(&iter, &header_name, &header_value)) { diff --git a/extensions/browser/api/web_request/web_request_api_helpers.cc b/extensions/browser/api/web_request/web_request_api_helpers.cc index 6f86bf4..c998367 100644 --- a/extensions/browser/api/web_request/web_request_api_helpers.cc +++ b/extensions/browser/api/web_request/web_request_api_helpers.cc @@ -378,7 +378,7 @@ EventResponseDelta* CalculateOnHeadersReceivedDelta( // Find deleted headers (header keys are treated case insensitively). { - void* iter = NULL; + size_t iter = 0; std::string name; std::string value; while (old_response_headers->EnumerateHeaderLines(&iter, &name, &value)) { @@ -401,7 +401,7 @@ EventResponseDelta* CalculateOnHeadersReceivedDelta( { for (const auto& i : *new_response_headers) { std::string name_lowercase = base::ToLowerASCII(i.first); - void* iter = nullptr; + size_t iter = 0; std::string name; std::string value; bool header_found = false; diff --git a/extensions/browser/api/web_request/web_request_event_details.cc b/extensions/browser/api/web_request/web_request_event_details.cc index 958faea..2382dcd 100644 --- a/extensions/browser/api/web_request/web_request_event_details.cc +++ b/extensions/browser/api/web_request/web_request_event_details.cc @@ -133,7 +133,7 @@ void WebRequestEventDetails::SetResponseHeaders( if (extra_info_spec_ & ExtraInfoSpec::RESPONSE_HEADERS) { base::ListValue* headers = new base::ListValue(); if (response_headers) { - void* iter = nullptr; + size_t iter = 0; std::string name; std::string value; while (response_headers->EnumerateHeaderLines(&iter, &name, &value)) -- cgit v1.1