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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/Cache.cpp

Issue 2787003002: Fetch API: Stop lowercasing header names. (Closed)
Patch Set: Rebase again Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/cachestorage/Cache.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
index 174bd4d0684106d2a7583054faffab56eaeda3d3..18c2d0238f64e03651532ba06ad1176c68443086 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -205,9 +205,8 @@ void RecordResponseTypeForAdd(const Member<Response>& response) {
bool VaryHeaderContainsAsterisk(const Response* response) {
const FetchHeaderList* headers = response->headers()->HeaderList();
- for (size_t i = 0; i < headers->size(); ++i) {
- const FetchHeaderList::Header& header = headers->Entry(i);
- if (header.first == "vary") {
+ for (const auto& header : headers->List()) {
+ if (EqualIgnoringASCIICase(header.first, "vary")) {
Vector<String> fields;
header.second.Split(',', fields);
for (size_t j = 0; j < fields.size(); ++j) {
nhiroki 2017/04/12 06:53:05 Can you replace this with range-based-for?
« no previous file with comments | « third_party/WebKit/Source/modules/BUILD.gn ('k') | third_party/WebKit/Source/modules/fetch/FetchHeaderList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698