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

Side by Side Diff: third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp

Issue 2585283002: Migrate WTF::Vector::append() to ::push_back() [part 6 of N] (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (FetchUtils::isSimpleHeader(header.key, header.value)) { 61 if (FetchUtils::isSimpleHeader(header.key, header.value)) {
62 // Exclude simple headers. 62 // Exclude simple headers.
63 continue; 63 continue;
64 } 64 }
65 if (equalIgnoringCase(header.key, "referer")) { 65 if (equalIgnoringCase(header.key, "referer")) {
66 // When the request is from a Worker, referrer header was added by 66 // When the request is from a Worker, referrer header was added by
67 // WorkerThreadableLoader. But it should not be added to 67 // WorkerThreadableLoader. But it should not be added to
68 // Access-Control-Request-Headers header. 68 // Access-Control-Request-Headers header.
69 continue; 69 continue;
70 } 70 }
71 filteredHeaders.append(header.key.lower()); 71 filteredHeaders.push_back(header.key.lower());
72 } 72 }
73 73
74 // Sort header names lexicographically. 74 // Sort header names lexicographically.
75 std::sort(filteredHeaders.begin(), filteredHeaders.end(), 75 std::sort(filteredHeaders.begin(), filteredHeaders.end(),
76 WTF::codePointCompareLessThan); 76 WTF::codePointCompareLessThan);
77 StringBuilder headerBuffer; 77 StringBuilder headerBuffer;
78 for (const String& header : filteredHeaders) { 78 for (const String& header : filteredHeaders) {
79 if (!headerBuffer.isEmpty()) 79 if (!headerBuffer.isEmpty())
80 headerBuffer.append(", "); 80 headerBuffer.append(", ");
81 headerBuffer.append(header); 81 headerBuffer.append(header);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // 427 //
428 // This is equivalent to the step 2 in 428 // This is equivalent to the step 2 in
429 // https://fetch.spec.whatwg.org/#http-network-or-cache-fetch 429 // https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
430 if (options.credentialsRequested == ClientDidNotRequestCredentials) 430 if (options.credentialsRequested == ClientDidNotRequestCredentials)
431 options.allowCredentials = DoNotAllowStoredCredentials; 431 options.allowCredentials = DoNotAllowStoredCredentials;
432 } 432 }
433 return true; 433 return true;
434 } 434 }
435 435
436 } // namespace blink 436 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp ('k') | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698