summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/api/web_request/web_request_api_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.cc2
-rw-r--r--components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc8
-rw-r--r--components/variations/service/variations_service.cc4
-rw-r--r--content/browser/appcache/appcache_update_job.cc6
-rw-r--r--content/browser/fileapi/blob_url_request_job_unittest.cc2
-rw-r--r--content/child/multipart_response_delegate.cc2
-rw-r--r--extensions/browser/api/declarative_webrequest/webrequest_action.cc2
-rw-r--r--extensions/browser/api/web_request/web_request_api_helpers.cc2
-rw-r--r--net/http/http_auth.cc4
-rw-r--r--net/http/http_auth_controller.cc6
-rw-r--r--net/http/http_network_transaction.cc2
-rw-r--r--net/http/http_network_transaction_unittest.cc2
-rw-r--r--net/http/http_response_headers.cc30
-rw-r--r--net/http/http_response_headers.h7
-rw-r--r--net/http/http_response_headers_unittest.cc4
-rw-r--r--net/http/http_stream_parser.cc2
-rw-r--r--net/http/http_vary_data.cc2
-rw-r--r--net/http/proxy_client_socket.cc2
-rw-r--r--net/tools/get_server_time/get_server_time.cc2
-rw-r--r--net/url_request/url_request_backoff_manager.cc2
-rw-r--r--net/url_request/url_request_http_job.cc10
-rw-r--r--net/websockets/websocket_basic_handshake_stream.cc14
-rw-r--r--sync/internal_api/attachments/attachment_downloader_impl.cc2
24 files changed, 60 insertions, 61 deletions
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index fb391c1..b6fafc8 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -2010,7 +2010,7 @@ TEST(ExtensionWebRequestHelpersTest,
deltas, headers1.get(), &new_headers1, &warning_set, &net_log);
EXPECT_TRUE(new_headers1->HasHeader("Foo"));
- void* iter = NULL;
+ size_t iter = 0;
std::string cookie_string;
std::set<std::string> expected_cookies;
expected_cookies.insert("name=value; domain=google.com; secure");
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.cc
index 8903057..9915b18 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.cc
@@ -544,7 +544,7 @@ std::vector<std::string> DataReductionProxyTamperDetection::GetHeaderValues(
const std::string& header_name) {
std::vector<std::string> values;
std::string value;
- void* iter = NULL;
+ size_t iter = 0;
while (headers->EnumerateHeader(&iter, header_name, &value)) {
values.push_back(value);
}
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
index 2830400..8945a02 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
@@ -82,7 +82,7 @@ bool GetDataReductionProxyActionValue(
DCHECK(!action_prefix.empty());
// A valid action does not include a trailing '='.
DCHECK(action_prefix[action_prefix.size() - 1] != kActionValueDelimiter);
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
std::string prefix = action_prefix + kActionValueDelimiter;
@@ -106,7 +106,7 @@ bool ParseHeadersAndSetBypassDuration(const net::HttpResponseHeaders* headers,
DCHECK(!action_prefix.empty());
// A valid action does not include a trailing '='.
DCHECK(action_prefix[action_prefix.size() - 1] != kActionValueDelimiter);
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
std::string prefix = action_prefix + kActionValueDelimiter;
@@ -188,7 +188,7 @@ bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers,
const size_t kVersionSize = 4;
const char kDataReductionProxyViaValue[] = "Chrome-Compression-Proxy";
size_t value_len = strlen(kDataReductionProxyViaValue);
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
// Case-sensitive comparison of |value|. Assumes the received protocol and the
@@ -318,7 +318,7 @@ void GetDataReductionProxyHeaderWithFingerprintRemoved(
kChromeProxyActionFingerprintChromeProxy) + kActionValueDelimiter;
std::string value;
- void* iter = NULL;
+ size_t iter = 0;
while (headers->EnumerateHeader(&iter, kChromeProxyHeader, &value)) {
if (value.size() > chrome_proxy_fingerprint_prefix.size()) {
if (base::StartsWith(value, chrome_proxy_fingerprint_prefix,
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
index 3d41ce3..0a63321 100644
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
@@ -216,7 +216,7 @@ base::Time GetReferenceDateForExpiryChecks(PrefService* local_state) {
std::string GetHeaderValue(const net::HttpResponseHeaders* headers,
const base::StringPiece& name) {
std::string value;
- headers->EnumerateHeader(NULL, name, &value);
+ headers->EnumerateHeader(nullptr, name, &value);
return value;
}
@@ -226,7 +226,7 @@ std::vector<std::string> GetHeaderValuesList(
const net::HttpResponseHeaders* headers,
const base::StringPiece& name) {
std::vector<std::string> values;
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
while (headers->EnumerateHeader(&iter, name, &value)) {
values.push_back(value);
diff --git a/content/browser/appcache/appcache_update_job.cc b/content/browser/appcache/appcache_update_job.cc
index b6ab3fb..b7133fc 100644
--- a/content/browser/appcache/appcache_update_job.cc
+++ b/content/browser/appcache/appcache_update_job.cc
@@ -279,7 +279,7 @@ void AppCacheUpdateJob::URLFetcher::AddConditionalHeaders(
// Add If-Modified-Since header if response info has Last-Modified header.
const std::string last_modified = "Last-Modified";
std::string last_modified_value;
- headers->EnumerateHeader(NULL, last_modified, &last_modified_value);
+ headers->EnumerateHeader(nullptr, last_modified, &last_modified_value);
if (!last_modified_value.empty()) {
extra_headers.SetHeader(net::HttpRequestHeaders::kIfModifiedSince,
last_modified_value);
@@ -288,7 +288,7 @@ void AppCacheUpdateJob::URLFetcher::AddConditionalHeaders(
// Add If-None-Match header if response info has ETag header.
const std::string etag = "ETag";
std::string etag_value;
- headers->EnumerateHeader(NULL, etag, &etag_value);
+ headers->EnumerateHeader(nullptr, etag, &etag_value);
if (!etag_value.empty()) {
extra_headers.SetHeader(net::HttpRequestHeaders::kIfNoneMatch,
etag_value);
@@ -1474,7 +1474,7 @@ void AppCacheUpdateJob::OnResponseInfoLoaded(
// Responses with a "vary" header get treated as expired.
const std::string name = "vary";
std::string value;
- void* iter = NULL;
+ size_t iter = 0;
if (!http_info->headers.get() ||
http_info->headers->RequiresValidation(http_info->request_time,
http_info->response_time,
diff --git a/content/browser/fileapi/blob_url_request_job_unittest.cc b/content/browser/fileapi/blob_url_request_job_unittest.cc
index 782a1e5..bdb430f 100644
--- a/content/browser/fileapi/blob_url_request_job_unittest.cc
+++ b/content/browser/fileapi/blob_url_request_job_unittest.cc
@@ -534,7 +534,7 @@ TEST_F(BlobURLRequestJobTest, TestExtraHeaders) {
std::string content_type;
EXPECT_TRUE(request_->response_headers()->GetMimeType(&content_type));
EXPECT_EQ(kTestContentType, content_type);
- void* iter = NULL;
+ size_t iter = 0;
std::string content_disposition;
EXPECT_TRUE(request_->response_headers()->EnumerateHeader(
&iter, "Content-Disposition", &content_disposition));
diff --git a/content/child/multipart_response_delegate.cc b/content/child/multipart_response_delegate.cc
index a37014a..ca01f80 100644
--- a/content/child/multipart_response_delegate.cc
+++ b/content/child/multipart_response_delegate.cc
@@ -249,7 +249,7 @@ bool MultipartResponseDelegate::ParseHeaders() {
for (size_t i = 0; i < arraysize(kReplaceHeaders); ++i) {
std::string name(kReplaceHeaders[i]);
std::string value;
- void* iterator = nullptr;
+ size_t iterator = 0;
while (response_headers->EnumerateHeader(&iterator, name, &value)) {
response.addHTTPHeaderField(WebString::fromLatin1(name),
WebString::fromLatin1(value));
diff --git a/extensions/browser/api/declarative_webrequest/webrequest_action.cc b/extensions/browser/api/declarative_webrequest/webrequest_action.cc
index c5ecf71..e3cf9a8 100644
--- a/extensions/browser/api/declarative_webrequest/webrequest_action.cc
+++ b/extensions/browser/api/declarative_webrequest/webrequest_action.cc
@@ -968,7 +968,7 @@ WebRequestRemoveResponseHeaderAction::CreateDelta(
LinkedPtrEventResponseDelta result(
new helpers::EventResponseDelta(extension_id, extension_install_time));
- void* iter = NULL;
+ size_t iter = 0;
std::string current_value;
while (headers->EnumerateHeader(&iter, name_, &current_value)) {
if (has_value_ && !base::EqualsCaseInsensitiveASCII(current_value, 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 c998367..158a8d9 100644
--- a/extensions/browser/api/web_request/web_request_api_helpers.cc
+++ b/extensions/browser/api/web_request/web_request_api_helpers.cc
@@ -838,7 +838,7 @@ static ParsedResponseCookies GetResponseCookies(
scoped_refptr<net::HttpResponseHeaders> override_response_headers) {
ParsedResponseCookies result;
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
while (override_response_headers->EnumerateHeader(&iter, "Set-Cookie",
&value)) {
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index 15768a0..f17b502 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -37,7 +37,7 @@ void HttpAuth::ChooseBestChallenge(
scoped_ptr<HttpAuthHandler> best;
const std::string header_name = GetChallengeHeaderName(target);
std::string cur_challenge;
- void* iter = NULL;
+ size_t iter = 0;
while (headers->EnumerateHeader(&iter, header_name, &cur_challenge)) {
scoped_ptr<HttpAuthHandler> cur;
int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
@@ -70,7 +70,7 @@ HttpAuth::AuthorizationResult HttpAuth::HandleChallengeResponse(
return HttpAuth::AUTHORIZATION_RESULT_REJECT;
std::string current_scheme_name = SchemeToString(current_scheme);
const std::string header_name = GetChallengeHeaderName(target);
- void* iter = NULL;
+ size_t iter = 0;
std::string challenge;
HttpAuth::AuthorizationResult authorization_result =
HttpAuth::AUTHORIZATION_RESULT_INVALID;
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index 294bde0..5c3d3a5 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -29,13 +29,13 @@ namespace {
std::string AuthChallengeLogMessage(HttpResponseHeaders* headers) {
std::string msg;
std::string header_val;
- void* iter = NULL;
+ size_t iter = 0;
while (headers->EnumerateHeader(&iter, "proxy-authenticate", &header_val)) {
msg.append("\n Has header Proxy-Authenticate: ");
msg.append(header_val);
}
- iter = NULL;
+ iter = 0;
while (headers->EnumerateHeader(&iter, "www-authenticate", &header_val)) {
msg.append("\n Has header WWW-Authenticate: ");
msg.append(header_val);
@@ -44,7 +44,7 @@ std::string AuthChallengeLogMessage(HttpResponseHeaders* headers) {
// RFC 4559 requires that a proxy indicate its support of NTLM/Negotiate
// authentication with a "Proxy-Support: Session-Based-Authentication"
// response header.
- iter = NULL;
+ iter = 0;
while (headers->EnumerateHeader(&iter, "proxy-support", &header_val)) {
msg.append("\n Has header Proxy-Support: ");
msg.append(header_val);
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 423cb870..d6baef1 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -88,7 +88,7 @@ void ProcessAlternativeServices(HttpNetworkSession* session,
return;
std::vector<std::string> alternate_protocol_values;
- void* iter = NULL;
+ size_t iter = 0;
std::string alternate_protocol_str;
while (headers.EnumerateHeader(&iter, kAlternateProtocolHeader,
&alternate_protocol_str)) {
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index ed7470b..ef00344 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -1116,7 +1116,7 @@ TEST_P(HttpNetworkTransactionTest, Head) {
EXPECT_FALSE(proxy_headers_handler.observed_before_proxy_headers_sent());
std::string server_header;
- void* iter = NULL;
+ size_t iter = 0;
bool has_server_header = response->headers->EnumerateHeader(
&iter, "Server", &server_header);
EXPECT_TRUE(has_server_header);
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 7cf2d0c..2167aac 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -571,14 +571,14 @@ bool HttpResponseHeaders::EnumerateHeaderLines(size_t* iter,
return true;
}
-bool HttpResponseHeaders::EnumerateHeader(void** iter,
+bool HttpResponseHeaders::EnumerateHeader(size_t* iter,
const base::StringPiece& name,
std::string* value) const {
size_t i;
if (!iter || !*iter) {
i = FindHeader(0, name);
} else {
- i = reinterpret_cast<size_t>(*iter);
+ i = *iter;
if (i >= parsed_.size()) {
i = std::string::npos;
} else if (!parsed_[i].is_continuation()) {
@@ -592,7 +592,7 @@ bool HttpResponseHeaders::EnumerateHeader(void** iter,
}
if (iter)
- *iter = reinterpret_cast<void*>(i + 1);
+ *iter = i + 1;
value->assign(parsed_[i].value_begin, parsed_[i].value_end);
return true;
}
@@ -601,7 +601,7 @@ bool HttpResponseHeaders::HasHeaderValue(const base::StringPiece& name,
const base::StringPiece& value) const {
// The value has to be an exact match. This is important since
// 'cache-control: no-cache' != 'cache-control: no-cache="foo"'
- void* iter = NULL;
+ size_t iter = 0;
std::string temp;
while (EnumerateHeader(&iter, name, &temp)) {
if (base::EqualsCaseInsensitiveASCII(value, temp))
@@ -757,7 +757,7 @@ bool HttpResponseHeaders::GetCacheControlDirective(const StringPiece& directive,
size_t directive_size = directive.size();
- void* iter = NULL;
+ size_t iter = 0;
while (EnumerateHeader(&iter, name, &value)) {
if (value.size() > directive_size + 1 &&
base::StartsWith(value, directive,
@@ -814,7 +814,7 @@ void HttpResponseHeaders::AddNonCacheableHeaders(HeaderSet* result) const {
const size_t kPrefixLen = sizeof(kPrefix) - 1;
std::string value;
- void* iter = NULL;
+ size_t iter = 0;
while (EnumerateHeader(&iter, kCacheControl, &value)) {
// If the value is smaller than the prefix and a terminal quote, skip
// it.
@@ -889,7 +889,7 @@ void HttpResponseHeaders::GetMimeTypeAndCharset(std::string* mime_type,
bool had_charset = false;
- void* iter = NULL;
+ size_t iter = 0;
while (EnumerateHeader(&iter, name, &value))
HttpUtil::ParseContentType(value, mime_type, charset, &had_charset, NULL);
}
@@ -1152,7 +1152,7 @@ bool HttpResponseHeaders::GetMaxAgeValue(TimeDelta* result) const {
bool HttpResponseHeaders::GetAgeValue(TimeDelta* result) const {
std::string value;
- if (!EnumerateHeader(NULL, "Age", &value))
+ if (!EnumerateHeader(nullptr, "Age", &value))
return false;
int64_t seconds;
@@ -1181,7 +1181,7 @@ bool HttpResponseHeaders::GetStaleWhileRevalidateValue(
bool HttpResponseHeaders::GetTimeValuedHeader(const std::string& name,
Time* result) const {
std::string value;
- if (!EnumerateHeader(NULL, name, &value))
+ if (!EnumerateHeader(nullptr, name, &value))
return false;
// When parsing HTTP dates it's beneficial to default to GMT because:
@@ -1223,7 +1223,7 @@ bool HttpResponseHeaders::IsKeepAlive() const {
return false;
for (const char* header : kConnectionHeaders) {
- void* iterator = nullptr;
+ size_t iterator = 0;
std::string token;
while (EnumerateHeader(&iterator, header, &token)) {
for (const KeepAliveToken& keep_alive_token : kKeepAliveTokens) {
@@ -1237,11 +1237,11 @@ bool HttpResponseHeaders::IsKeepAlive() const {
bool HttpResponseHeaders::HasStrongValidators() const {
std::string etag_header;
- EnumerateHeader(NULL, "etag", &etag_header);
+ EnumerateHeader(nullptr, "etag", &etag_header);
std::string last_modified_header;
- EnumerateHeader(NULL, "Last-Modified", &last_modified_header);
+ EnumerateHeader(nullptr, "Last-Modified", &last_modified_header);
std::string date_header;
- EnumerateHeader(NULL, "Date", &date_header);
+ EnumerateHeader(nullptr, "Date", &date_header);
return HttpUtil::HasStrongValidators(GetHttpVersion(),
etag_header,
last_modified_header,
@@ -1256,7 +1256,7 @@ int64_t HttpResponseHeaders::GetContentLength() const {
int64_t HttpResponseHeaders::GetInt64HeaderValue(
const std::string& header) const {
- void* iter = NULL;
+ size_t iter = 0;
std::string content_length_val;
if (!EnumerateHeader(&iter, header, &content_length_val))
return -1;
@@ -1284,7 +1284,7 @@ int64_t HttpResponseHeaders::GetInt64HeaderValue(
bool HttpResponseHeaders::GetContentRange(int64_t* first_byte_position,
int64_t* last_byte_position,
int64_t* instance_length) const {
- void* iter = NULL;
+ size_t iter = 0;
std::string content_range_spec;
*first_byte_position = *last_byte_position = *instance_length = -1;
if (!EnumerateHeader(&iter, kContentRange, &content_range_spec))
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
index 7d75c63..8f227be 100644
--- a/net/http/http_response_headers.h
+++ b/net/http/http_response_headers.h
@@ -171,13 +171,12 @@ class NET_EXPORT HttpResponseHeaders
std::string* value) const;
// Enumerate the values of the specified header. If you are only interested
- // in the first header, then you can pass NULL for the 'iter' parameter.
+ // in the first header, then you can pass nullptr for the 'iter' parameter.
// Otherwise, to iterate across all values for the specified header,
- // initialize a 'void*' variable to NULL and pass it by address to
+ // initialize a 'size_t' variable to 0 and pass it by address to
// EnumerateHeader. Note that a header might have an empty value. Call
// EnumerateHeader repeatedly until it returns false.
- // TODO(Olli Raula) Remove void**
- bool EnumerateHeader(void** iter,
+ bool EnumerateHeader(size_t* iter,
const base::StringPiece& name,
std::string* value) const;
diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc
index 9c58807..cb0d200 100644
--- a/net/http/http_response_headers_unittest.cc
+++ b/net/http/http_response_headers_unittest.cc
@@ -457,7 +457,7 @@ TEST(HttpResponseHeadersTest, EnumerateHeader_Coalesced) {
HeadersToRaw(&headers);
scoped_refptr<HttpResponseHeaders> parsed(new HttpResponseHeaders(headers));
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
EXPECT_TRUE(parsed->EnumerateHeader(&iter, "cache-control", &value));
EXPECT_EQ("private", value);
@@ -478,7 +478,7 @@ TEST(HttpResponseHeadersTest, EnumerateHeader_Challenge) {
HeadersToRaw(&headers);
scoped_refptr<HttpResponseHeaders> parsed(new HttpResponseHeaders(headers));
- void* iter = NULL;
+ size_t iter = 0;
std::string value;
EXPECT_TRUE(parsed->EnumerateHeader(&iter, "WWW-Authenticate", &value));
EXPECT_EQ("Digest realm=foobar, nonce=x, domain=y", value);
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index e115743..e4a4207 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -66,7 +66,7 @@ std::string GetResponseHeaderLines(const HttpResponseHeaders& headers) {
// values.
bool HeadersContainMultipleCopiesOfField(const HttpResponseHeaders& headers,
const std::string& field_name) {
- void* it = NULL;
+ size_t it = 0;
std::string field_value;
if (!headers.EnumerateHeader(&it, field_name, &field_value))
return false;
diff --git a/net/http/http_vary_data.cc b/net/http/http_vary_data.cc
index 9938d29..6b3a02a 100644
--- a/net/http/http_vary_data.cc
+++ b/net/http/http_vary_data.cc
@@ -32,7 +32,7 @@ bool HttpVaryData::Init(const HttpRequestInfo& request_info,
// If the Vary header contains '*' then we should not construct any vary data
// since it is all usurped by a '*'. See section 13.6 of RFC 2616.
//
- void* iter = NULL;
+ size_t iter = 0;
std::string name = "vary", request_header;
while (response_headers.EnumerateHeader(&iter, name, &request_header)) {
if (request_header == "*")
diff --git a/net/http/proxy_client_socket.cc b/net/http/proxy_client_socket.cc
index b0dd40b..3b36ed8 100644
--- a/net/http/proxy_client_socket.cc
+++ b/net/http/proxy_client_socket.cc
@@ -22,7 +22,7 @@ namespace {
void CopyHeaderValues(scoped_refptr<HttpResponseHeaders> source,
scoped_refptr<HttpResponseHeaders> dest,
const std::string& header_name) {
- void* iter = NULL;
+ size_t iter = 0;
std::string header_value;
while (source->EnumerateHeader(&iter, header_name, &header_value))
diff --git a/net/tools/get_server_time/get_server_time.cc b/net/tools/get_server_time/get_server_time.cc
index 3363bb0..65279d5 100644
--- a/net/tools/get_server_time/get_server_time.cc
+++ b/net/tools/get_server_time/get_server_time.cc
@@ -283,7 +283,7 @@ int main(int argc, char* argv[]) {
return EXIT_FAILURE;
}
- void* iter = NULL;
+ size_t iter = 0;
std::string date_header;
while (headers->EnumerateHeader(&iter, "Date", &date_header)) {
std::printf("Got date header: %s\n", date_header.c_str());
diff --git a/net/url_request/url_request_backoff_manager.cc b/net/url_request/url_request_backoff_manager.cc
index 86fa965..1212c47 100644
--- a/net/url_request/url_request_backoff_manager.cc
+++ b/net/url_request/url_request_backoff_manager.cc
@@ -111,7 +111,7 @@ bool URLRequestBackoffManager::GetBackoffTime(HttpResponseHeaders* headers,
base::TimeDelta* result) const {
base::StringPiece name("Backoff");
std::string value;
- void* iter = NULL;
+ size_t iter = 0;
while (headers->EnumerateHeader(&iter, name, &value)) {
int64_t seconds;
base::StringToInt64(value, &seconds);
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 918e9a2..68d5ed9 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -364,7 +364,7 @@ void URLRequestHttpJob::NotifyHeadersComplete() {
} else {
const std::string name = "Get-Dictionary";
std::string url_text;
- void* iter = NULL;
+ size_t iter = 0;
// TODO(jar): We need to not fetch dictionaries the first time they are
// seen, but rather wait until we can justify their usefulness.
// For now, we will only fetch the first dictionary, which will at least
@@ -399,7 +399,7 @@ void URLRequestHttpJob::NotifyHeadersComplete() {
// as though the content is corrupted (when we discover it is not SDCH
// encoded).
std::string sdch_response_status;
- void* iter = NULL;
+ size_t iter = 0;
while (GetResponseHeaders()->EnumerateHeader(&iter, "X-Sdch-Encode",
&sdch_response_status)) {
if (sdch_response_status == "0") {
@@ -840,7 +840,7 @@ void URLRequestHttpJob::FetchResponseCookies(
const std::string name = "Set-Cookie";
std::string value;
- void* iter = NULL;
+ size_t iter = 0;
HttpResponseHeaders* headers = GetResponseHeaders();
while (headers->EnumerateHeader(&iter, name, &value)) {
if (!value.empty())
@@ -893,7 +893,7 @@ void URLRequestHttpJob::ProcessStrictTransportSecurityHeader() {
// first such header field.
HttpResponseHeaders* headers = GetResponseHeaders();
std::string value;
- if (headers->EnumerateHeader(NULL, "Strict-Transport-Security", &value))
+ if (headers->EnumerateHeader(nullptr, "Strict-Transport-Security", &value))
security_state->AddHSTSHeader(request_info_.url.host(), value);
}
@@ -1176,7 +1176,7 @@ Filter* URLRequestHttpJob::SetupFilter() const {
std::vector<Filter::FilterType> encoding_types;
std::string encoding_type;
HttpResponseHeaders* headers = GetResponseHeaders();
- void* iter = NULL;
+ size_t iter = 0;
while (headers->EnumerateHeader(&iter, "Content-Encoding", &encoding_type)) {
encoding_types.push_back(Filter::ConvertEncodingToType(encoding_type));
}
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc
index 92af20c..e26bb99 100644
--- a/net/websockets/websocket_basic_handshake_stream.cc
+++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -101,10 +101,10 @@ void AddVectorHeaderIfNonEmpty(const char* name,
GetHeaderResult GetSingleHeaderValue(const HttpResponseHeaders* headers,
const base::StringPiece& name,
std::string* value) {
- void* state = nullptr;
+ size_t iter = 0;
size_t num_values = 0;
std::string temp_value;
- while (headers->EnumerateHeader(&state, name, &temp_value)) {
+ while (headers->EnumerateHeader(&iter, name, &temp_value)) {
if (++num_values > 1)
return GET_HEADER_MULTIPLE;
*value = temp_value;
@@ -185,7 +185,7 @@ bool ValidateSubProtocol(
const std::vector<std::string>& requested_sub_protocols,
std::string* sub_protocol,
std::string* failure_message) {
- void* state = nullptr;
+ size_t iter = 0;
std::string value;
base::hash_set<std::string> requested_set(requested_sub_protocols.begin(),
requested_sub_protocols.end());
@@ -195,8 +195,8 @@ bool ValidateSubProtocol(
while (!has_invalid_protocol || !has_multiple_protocols) {
std::string temp_value;
- if (!headers->EnumerateHeader(
- &state, websockets::kSecWebSocketProtocol, &temp_value))
+ if (!headers->EnumerateHeader(&iter, websockets::kSecWebSocketProtocol,
+ &temp_value))
break;
value = temp_value;
if (requested_set.count(value) == 0)
@@ -235,13 +235,13 @@ bool ValidateExtensions(const HttpResponseHeaders* headers,
std::string* accepted_extensions_descriptor,
std::string* failure_message,
WebSocketExtensionParams* params) {
- void* state = nullptr;
+ size_t iter = 0;
std::string header_value;
std::vector<std::string> header_values;
// TODO(ricea): If adding support for additional extensions, generalise this
// code.
bool seen_permessage_deflate = false;
- while (headers->EnumerateHeader(&state, websockets::kSecWebSocketExtensions,
+ while (headers->EnumerateHeader(&iter, websockets::kSecWebSocketExtensions,
&header_value)) {
WebSocketExtensionParser parser;
if (!parser.Parse(header_value)) {
diff --git a/sync/internal_api/attachments/attachment_downloader_impl.cc b/sync/internal_api/attachments/attachment_downloader_impl.cc
index 0bdcbc3..295470ec 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl.cc
@@ -256,7 +256,7 @@ bool AttachmentDownloaderImpl::ExtractCrc32c(
std::string crc32c_encoded;
std::string header_value;
- void* iter = NULL;
+ size_t iter = 0;
// Iterate over all matching headers.
while (headers->EnumerateHeader(&iter, "x-goog-hash", &header_value)) {
// Because EnumerateHeader is smart about list values, header_value will