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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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/serviceworkers/ForeignFetchRespondWithObserver.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
index 1d4af482bdc039366af829128878753f0c1a1ce7..92e64564a5baafd3161106fbf1c7e8fcb20c1124 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
@@ -69,7 +69,7 @@ void ForeignFetchRespondWithObserver::responseWasFulfilled(
HTTPHeaderSet headers;
if (foreignFetchResponse.hasHeaders()) {
for (const String& header : foreignFetchResponse.headers())
- headers.add(header);
+ headers.insert(header);
if (response->response()->getType() == FetchResponseData::CORSType) {
const HTTPHeaderSet& existingHeaders =
response->response()->corsExposedHeaderNames();
@@ -77,7 +77,7 @@ void ForeignFetchRespondWithObserver::responseWasFulfilled(
for (HTTPHeaderSet::iterator it = headers.begin(); it != headers.end();
++it) {
if (!existingHeaders.contains(*it))
- headersToRemove.add(*it);
+ headersToRemove.insert(*it);
}
headers.removeAll(headersToRemove);
}

Powered by Google App Engine
This is Rietveld 408576698