| OLD | NEW |
| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 for (; search->name; ++search) { | 247 for (; search->name; ++search) { |
| 248 std::string header_value; | 248 std::string header_value; |
| 249 if (!headers.GetHeader(search->name, &header_value)) | 249 if (!headers.GetHeader(search->name, &header_value)) |
| 250 continue; | 250 continue; |
| 251 | 251 |
| 252 if (!search->value) | 252 if (!search->value) |
| 253 return true; | 253 return true; |
| 254 | 254 |
| 255 HttpUtil::ValuesIterator v(header_value.begin(), header_value.end(), ','); | 255 HttpUtil::ValuesIterator v(header_value.begin(), header_value.end(), ','); |
| 256 while (v.GetNext()) { | 256 while (v.GetNext()) { |
| 257 if (LowerCaseEqualsASCII(v.value_begin(), v.value_end(), search->value)) | 257 if (base::LowerCaseEqualsASCII(v.value_begin(), v.value_end(), |
| 258 search->value)) { |
| 258 return true; | 259 return true; |
| 260 } |
| 259 } | 261 } |
| 260 } | 262 } |
| 261 return false; | 263 return false; |
| 262 } | 264 } |
| 263 | 265 |
| 264 //----------------------------------------------------------------------------- | 266 //----------------------------------------------------------------------------- |
| 265 | 267 |
| 266 HttpCache::Transaction::Transaction(RequestPriority priority, HttpCache* cache) | 268 HttpCache::Transaction::Transaction(RequestPriority priority, HttpCache* cache) |
| 267 : next_state_(STATE_NONE), | 269 : next_state_(STATE_NONE), |
| 268 request_(NULL), | 270 request_(NULL), |
| (...skipping 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2978 default: | 2980 default: |
| 2979 NOTREACHED(); | 2981 NOTREACHED(); |
| 2980 } | 2982 } |
| 2981 } | 2983 } |
| 2982 | 2984 |
| 2983 void HttpCache::Transaction::OnIOComplete(int result) { | 2985 void HttpCache::Transaction::OnIOComplete(int result) { |
| 2984 DoLoop(result); | 2986 DoLoop(result); |
| 2985 } | 2987 } |
| 2986 | 2988 |
| 2987 } // namespace net | 2989 } // namespace net |
| OLD | NEW |