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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
index b7d978472646df4473c9d762bc2a20e1fc584305..94b4a054dde9c8527e4c2f3cafc3af6e67a523d6 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -304,7 +304,7 @@ void ContentSecurityPolicy::addPolicyFromHeaderValue(
m_disableEvalErrorMessage.isNull())
m_disableEvalErrorMessage = policy->evalDisabledErrorMessage();
- m_policies.append(policy.release());
+ m_policies.push_back(policy.release());
// Skip the comma, and begin the next header from the current position.
ASSERT(position == end || *position == ',');
@@ -364,7 +364,7 @@ std::unique_ptr<Vector<CSPHeaderAndType>> ContentSecurityPolicy::headers()
WTF::wrapUnique(new Vector<CSPHeaderAndType>);
for (const auto& policy : m_policies) {
CSPHeaderAndType headerAndType(policy->header(), policy->headerType());
- headers->append(headerAndType);
+ headers->push_back(headerAndType);
}
return headers;
}
@@ -1426,7 +1426,7 @@ void ContentSecurityPolicy::logToConsole(ConsoleMessage* consoleMessage,
else if (m_executionContext)
m_executionContext->addConsoleMessage(consoleMessage);
else
- m_consoleMessages.append(consoleMessage);
+ m_consoleMessages.push_back(consoleMessage);
}
void ContentSecurityPolicy::reportBlockedScriptExecutionToInspector(
@@ -1606,7 +1606,7 @@ bool ContentSecurityPolicy::subsumes(const ContentSecurityPolicy& other) const {
CSPDirectiveListVector otherVector;
for (const auto& policy : other.m_policies) {
if (!policy->isReportOnly())
- otherVector.append(policy);
+ otherVector.push_back(policy);
}
return m_policies[0]->subsumes(otherVector);

Powered by Google App Engine
This is Rietveld 408576698