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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/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 643530e9612c7c16b671f47f1cecc9dfaef22e18..3f0944bfd518d812cbb647b17197fdace7db1d23 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -60,11 +60,9 @@
#include "public/platform/Platform.h"
#include "public/platform/WebAddressSpace.h"
#include "public/platform/WebURLRequest.h"
-#include "wtf/PtrUtil.h"
#include "wtf/StringHasher.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/StringUTF8Adaptor.h"
-#include <memory>
namespace blink {
@@ -345,9 +343,9 @@ void ContentSecurityPolicy::setOverrideURLForSelf(const KURL& url)
m_selfSource = new CSPSource(this, m_selfProtocol, origin->host(), origin->port(), String(), CSPSource::NoWildcard, CSPSource::NoWildcard);
}
-std::unique_ptr<Vector<CSPHeaderAndType>> ContentSecurityPolicy::headers() const
+PassOwnPtr<Vector<CSPHeaderAndType>> ContentSecurityPolicy::headers() const
{
- std::unique_ptr<Vector<CSPHeaderAndType>> headers = wrapUnique(new Vector<CSPHeaderAndType>);
+ OwnPtr<Vector<CSPHeaderAndType>> headers = adoptPtr(new Vector<CSPHeaderAndType>);
for (const auto& policy : m_policies) {
CSPHeaderAndType headerAndType(policy->header(), policy->headerType());
headers->append(headerAndType);
@@ -810,7 +808,7 @@ static void gatherSecurityPolicyViolationEventData(SecurityPolicyViolationEventI
if (!SecurityOrigin::isSecure(document->url()) && document->loader())
init.setStatusCode(document->loader()->response().httpStatusCode());
- std::unique_ptr<SourceLocation> location = SourceLocation::capture(document);
+ OwnPtr<SourceLocation> location = SourceLocation::capture(document);
if (location->lineNumber()) {
KURL source = KURL(ParsedURLString, location->url());
init.setSourceFile(stripURLForUseInReport(document, source, redirectStatus));
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h ('k') | third_party/WebKit/Source/core/html/ClassList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698