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

Unified Diff: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h 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/platform/feature_policy/FeaturePolicy.cpp
diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
index 54b89d4861000c892157e1b92fe8a77f8088055f..44d6c96359a7499994c6a3ded2c65001bcdcc404 100644
--- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
+++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
@@ -79,7 +79,7 @@ void FeaturePolicy::Whitelist::addAll() {
}
void FeaturePolicy::Whitelist::add(RefPtr<SecurityOrigin> origin) {
- m_origins.append(std::move(origin));
+ m_origins.push_back(std::move(origin));
}
bool FeaturePolicy::Whitelist::contains(const SecurityOrigin& origin) const {
@@ -160,7 +160,7 @@ WebParsedFeaturePolicy FeaturePolicy::parseFeaturePolicy(
std::unique_ptr<JSONArray> policyItems = parseJSONHeader(policy, 50);
if (!policyItems) {
if (messages)
- messages->append("Unable to parse header");
+ messages->push_back("Unable to parse header");
return whitelists;
}
@@ -168,7 +168,7 @@ WebParsedFeaturePolicy FeaturePolicy::parseFeaturePolicy(
JSONObject* item = JSONObject::cast(policyItems->at(i));
if (!item) {
if (messages)
- messages->append("Policy is not an object");
+ messages->push_back("Policy is not an object");
continue; // Array element is not an object; skip
}
@@ -178,7 +178,7 @@ WebParsedFeaturePolicy FeaturePolicy::parseFeaturePolicy(
JSONArray* targets = JSONArray::cast(entry.second);
if (!targets) {
if (messages)
- messages->append("Whitelist is not an array of strings.");
+ messages->push_back("Whitelist is not an array of strings.");
continue;
}
@@ -190,22 +190,22 @@ WebParsedFeaturePolicy FeaturePolicy::parseFeaturePolicy(
if (targets->at(j)->asString(&targetString)) {
if (equalIgnoringCase(targetString, "self")) {
if (!origin->isUnique())
- origins.append(origin);
+ origins.push_back(origin);
} else if (targetString == "*") {
whitelist.matchesAllOrigins = true;
} else {
WebSecurityOrigin targetOrigin =
WebSecurityOrigin::createFromString(targetString);
if (!targetOrigin.isNull() && !targetOrigin.isUnique())
- origins.append(targetOrigin);
+ origins.push_back(targetOrigin);
}
} else {
if (messages)
- messages->append("Whitelist is not an array of strings.");
+ messages->push_back("Whitelist is not an array of strings.");
}
}
whitelist.origins = origins;
- whitelists.append(whitelist);
+ whitelists.push_back(whitelist);
}
}
return whitelists;

Powered by Google App Engine
This is Rietveld 408576698