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

Side by Side Diff: third_party/WebKit/Source/core/dom/RemoteSecurityContext.cpp

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/RemoteSecurityContext.h" 5 #include "core/dom/RemoteSecurityContext.h"
6 6
7 #include "core/frame/csp/ContentSecurityPolicy.h" 7 #include "core/frame/csp/ContentSecurityPolicy.h"
8 #include "platform/weborigin/SecurityOrigin.h" 8 #include "platform/weborigin/SecurityOrigin.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 10
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 DEFINE_TRACE(RemoteSecurityContext) 33 DEFINE_TRACE(RemoteSecurityContext)
34 { 34 {
35 SecurityContext::trace(visitor); 35 SecurityContext::trace(visitor);
36 } 36 }
37 37
38 void RemoteSecurityContext::setReplicatedOrigin(PassRefPtr<SecurityOrigin> origi n) 38 void RemoteSecurityContext::setReplicatedOrigin(PassRefPtr<SecurityOrigin> origi n)
39 { 39 {
40 DCHECK(origin); 40 DCHECK(origin);
41 setSecurityOrigin(origin); 41 setSecurityOrigin(std::move(origin));
42 contentSecurityPolicy()->setupSelf(*getSecurityOrigin()); 42 contentSecurityPolicy()->setupSelf(*getSecurityOrigin());
43 } 43 }
44 44
45 void RemoteSecurityContext::resetReplicatedContentSecurityPolicy() 45 void RemoteSecurityContext::resetReplicatedContentSecurityPolicy()
46 { 46 {
47 DCHECK(getSecurityOrigin()); 47 DCHECK(getSecurityOrigin());
48 setContentSecurityPolicy(ContentSecurityPolicy::create()); 48 setContentSecurityPolicy(ContentSecurityPolicy::create());
49 contentSecurityPolicy()->setupSelf(*getSecurityOrigin()); 49 contentSecurityPolicy()->setupSelf(*getSecurityOrigin());
50 } 50 }
51 51
52 } // namespace blink 52 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/events/MessageEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698