| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/dom/RemoteSecurityContext.h" | 6 #include "core/dom/RemoteSecurityContext.h" |
| 7 | 7 |
| 8 #include "core/frame/csp/ContentSecurityPolicy.h" | 8 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 9 #include "platform/weborigin/SecurityOrigin.h" | 9 #include "platform/weborigin/SecurityOrigin.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // grantUniversalAccess(). | 27 // grantUniversalAccess(). |
| 28 } | 28 } |
| 29 | 29 |
| 30 PassRefPtr<RemoteSecurityContext> RemoteSecurityContext::create() | 30 PassRefPtr<RemoteSecurityContext> RemoteSecurityContext::create() |
| 31 { | 31 { |
| 32 return adoptRef(new RemoteSecurityContext()); | 32 return adoptRef(new RemoteSecurityContext()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void RemoteSecurityContext::setReplicatedOrigin(PassRefPtr<SecurityOrigin> origi
n) | 35 void RemoteSecurityContext::setReplicatedOrigin(PassRefPtr<SecurityOrigin> origi
n) |
| 36 { | 36 { |
| 37 // FIXME: Currently, replicated security origins are passed only at | |
| 38 // RemoteFrame creation time. Eventually, this class will also need to | |
| 39 // handle origin updates to handle cases like setting document.domain, but | |
| 40 // for now, check that this is the first and only time we are setting the | |
| 41 // origin. | |
| 42 ASSERT(!haveInitializedSecurityOrigin()); | |
| 43 setSecurityOrigin(origin); | 37 setSecurityOrigin(origin); |
| 44 } | 38 } |
| 45 | 39 |
| 46 | 40 |
| 47 } // namespace blink | 41 } // namespace blink |
| OLD | NEW |