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

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

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 9
10 namespace blink { 10 namespace blink {
11 11
12 RemoteSecurityContext::RemoteSecurityContext() 12 RemoteSecurityContext::RemoteSecurityContext()
13 : SecurityContext() 13 : SecurityContext()
14 { 14 {
15 // RemoteSecurityContext's origin is expected to stay uninitialized until 15 // RemoteSecurityContext's origin is expected to stay uninitialized until
16 // we set it using replicated origin data from the browser process. 16 // we set it using replicated origin data from the browser process.
17 ASSERT(!haveInitializedSecurityOrigin()); 17 ASSERT(!securityOrigin());
18 18
19 // CSP will not be replicated for RemoteSecurityContexts, as it is moving 19 // CSP will not be replicated for RemoteSecurityContexts, as it is moving
20 // to the browser process. For now, initialize CSP to a default 20 // to the browser process. For now, initialize CSP to a default
21 // locked-down policy. 21 // locked-down policy.
22 setContentSecurityPolicy(ContentSecurityPolicy::create()); 22 setContentSecurityPolicy(ContentSecurityPolicy::create());
23 23
24 // FIXME: Document::initSecurityContext has a few other things we may 24 // FIXME: Document::initSecurityContext has a few other things we may
25 // eventually want here, such as enforcing a setting to 25 // eventually want here, such as enforcing a setting to
26 // grantUniversalAccess(). 26 // grantUniversalAccess().
27 } 27 }
28 28
29 PassRefPtrWillBeRawPtr<RemoteSecurityContext> RemoteSecurityContext::create() 29 PassRefPtrWillBeRawPtr<RemoteSecurityContext> RemoteSecurityContext::create()
30 { 30 {
31 return adoptRefWillBeNoop(new RemoteSecurityContext()); 31 return adoptRefWillBeNoop(new RemoteSecurityContext());
32 } 32 }
33 33
34 DEFINE_TRACE(RemoteSecurityContext) 34 DEFINE_TRACE(RemoteSecurityContext)
35 { 35 {
36 SecurityContext::trace(visitor); 36 SecurityContext::trace(visitor);
37 } 37 }
38 38
39 void RemoteSecurityContext::setReplicatedOrigin(PassRefPtr<SecurityOrigin> origi n) 39 void RemoteSecurityContext::setReplicatedOrigin(PassRefPtr<SecurityOrigin> origi n)
40 { 40 {
41 setSecurityOrigin(origin); 41 setSecurityOrigin(origin);
42 } 42 }
43 43
44 44
45 } // namespace blink 45 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698