| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |