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

Side by Side Diff: extensions/browser/api/web_request/web_request_api_helpers.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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 | « content/test/plugin/plugin_test.cc ('k') | extensions/common/csp_validator.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 "extensions/browser/api/web_request/web_request_api_helpers.h" 5 #include "extensions/browser/api/web_request/web_request_api_helpers.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void* iter = NULL; 343 void* iter = NULL;
344 std::string name; 344 std::string name;
345 std::string value; 345 std::string value;
346 while (old_response_headers->EnumerateHeaderLines(&iter, &name, &value)) { 346 while (old_response_headers->EnumerateHeaderLines(&iter, &name, &value)) {
347 std::string name_lowercase(name); 347 std::string name_lowercase(name);
348 base::StringToLowerASCII(&name_lowercase); 348 base::StringToLowerASCII(&name_lowercase);
349 349
350 bool header_found = false; 350 bool header_found = false;
351 for (ResponseHeaders::const_iterator i = new_response_headers->begin(); 351 for (ResponseHeaders::const_iterator i = new_response_headers->begin();
352 i != new_response_headers->end(); ++i) { 352 i != new_response_headers->end(); ++i) {
353 if (LowerCaseEqualsASCII(i->first, name_lowercase.c_str()) && 353 if (base::LowerCaseEqualsASCII(i->first, name_lowercase.c_str()) &&
354 value == i->second) { 354 value == i->second) {
355 header_found = true; 355 header_found = true;
356 break; 356 break;
357 } 357 }
358 } 358 }
359 if (!header_found) 359 if (!header_found)
360 result->deleted_response_headers.push_back(ResponseHeader(name, value)); 360 result->deleted_response_headers.push_back(ResponseHeader(name, value));
361 } 361 }
362 } 362 }
363 363
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 std::find(kResourceTypeStrings, 1279 std::find(kResourceTypeStrings,
1280 kResourceTypeStrings + kResourceTypeStringsLength, 1280 kResourceTypeStrings + kResourceTypeStringsLength,
1281 type_str); 1281 type_str);
1282 if (iter == (kResourceTypeStrings + kResourceTypeStringsLength)) 1282 if (iter == (kResourceTypeStrings + kResourceTypeStringsLength))
1283 return false; 1283 return false;
1284 *type = kResourceTypeValues[iter - kResourceTypeStrings]; 1284 *type = kResourceTypeValues[iter - kResourceTypeStrings];
1285 return true; 1285 return true;
1286 } 1286 }
1287 1287
1288 } // namespace extension_web_request_api_helpers 1288 } // namespace extension_web_request_api_helpers
OLDNEW
« no previous file with comments | « content/test/plugin/plugin_test.cc ('k') | extensions/common/csp_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698