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

Side by Side Diff: net/http/http_cache_transaction.cc

Issue 662553002: Convert ARRAYSIZE_UNSAFE -> arraysize in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/http/http_byte_range_unittest.cc ('k') | net/http/http_content_disposition_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/http/http_cache_transaction.h" 5 #include "net/http/http_cache_transaction.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 { kForceFetchHeaders, LOAD_BYPASS_CACHE }, 2008 { kForceFetchHeaders, LOAD_BYPASS_CACHE },
2009 { kForceValidateHeaders, LOAD_VALIDATE_CACHE }, 2009 { kForceValidateHeaders, LOAD_VALIDATE_CACHE },
2010 }; 2010 };
2011 2011
2012 bool range_found = false; 2012 bool range_found = false;
2013 bool external_validation_error = false; 2013 bool external_validation_error = false;
2014 2014
2015 if (request_->extra_headers.HasHeader(HttpRequestHeaders::kRange)) 2015 if (request_->extra_headers.HasHeader(HttpRequestHeaders::kRange))
2016 range_found = true; 2016 range_found = true;
2017 2017
2018 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kSpecialHeaders); ++i) { 2018 for (size_t i = 0; i < arraysize(kSpecialHeaders); ++i) {
2019 if (HeaderMatches(request_->extra_headers, kSpecialHeaders[i].search)) { 2019 if (HeaderMatches(request_->extra_headers, kSpecialHeaders[i].search)) {
2020 effective_load_flags_ |= kSpecialHeaders[i].load_flag; 2020 effective_load_flags_ |= kSpecialHeaders[i].load_flag;
2021 break; 2021 break;
2022 } 2022 }
2023 } 2023 }
2024 2024
2025 // Check for conditionalization headers which may correspond with a 2025 // Check for conditionalization headers which may correspond with a
2026 // cache validation request. 2026 // cache validation request.
2027 for (size_t i = 0; i < arraysize(kValidationHeaders); ++i) { 2027 for (size_t i = 0; i < arraysize(kValidationHeaders); ++i) {
2028 const ValidationHeaderInfo& info = kValidationHeaders[i]; 2028 const ValidationHeaderInfo& info = kValidationHeaders[i];
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2946 2946
2947 void HttpCache::Transaction::OnIOComplete(int result) { 2947 void HttpCache::Transaction::OnIOComplete(int result) {
2948 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422516 is fixed. 2948 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422516 is fixed.
2949 tracked_objects::ScopedProfile tracking_profile( 2949 tracked_objects::ScopedProfile tracking_profile(
2950 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete")); 2950 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete"));
2951 2951
2952 DoLoop(result); 2952 DoLoop(result);
2953 } 2953 }
2954 2954
2955 } // namespace net 2955 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_byte_range_unittest.cc ('k') | net/http/http_content_disposition_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698