OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 // The RenderFrame no longer exists and will need to be created again. | 89 // The RenderFrame no longer exists and will need to be created again. |
90 current_frame_host()->set_render_frame_created(false); | 90 current_frame_host()->set_render_frame_created(false); |
91 | 91 |
92 // The children may not have been cleared if a cross-process navigation | 92 // The children may not have been cleared if a cross-process navigation |
93 // commits before the old process cleans everything up. Make sure the child | 93 // commits before the old process cleans everything up. Make sure the child |
94 // nodes get deleted before swapping to a new process. | 94 // nodes get deleted before swapping to a new process. |
95 ScopedVector<FrameTreeNode> old_children = children_.Pass(); | 95 ScopedVector<FrameTreeNode> old_children = children_.Pass(); |
96 old_children.clear(); // May notify observers. | 96 old_children.clear(); // May notify observers. |
97 } | 97 } |
98 | 98 |
99 void FrameTreeNode::SetOriginFromURL(const GURL& url) { | |
Charlie Reis
2014/11/13 18:00:57
This is more SetReplicationState, right?
| |
100 // This mimicks blink::SecurityOrigin::create for detecting schemes that | |
101 // should result in unique origins. | |
102 // TODO(alexmos): blink::SecurityOrigin::create does other things that we may | |
103 // want to do here eventually (e.g., handling innerURLs for blob: and | |
104 // filesystem:). | |
105 if (!url.is_valid() || | |
106 url.SchemeIs(url::kAboutScheme) || | |
dcheng
2014/11/12 22:16:43
Hm... this doesn't seem quite correct. about:blank
alexmos
2014/11/18 18:25:32
This and the other more complex cases are now fixe
| |
107 url.SchemeIs(url::kDataScheme) || | |
108 url.SchemeIs(url::kJavaScriptScheme)) { | |
109 replication_state_.is_unique_origin = true; | |
110 replication_state_.origin = url::Origin(); | |
Charlie Reis
2014/11/13 18:00:57
Hmm, I'm wondering if there's a better place for t
alexmos
2014/11/18 18:25:32
See my answer for Daniel's question above.
| |
111 return; | |
112 } | |
113 DCHECK(url.GetOrigin().is_valid()); | |
114 replication_state_.origin = url::Origin(url.GetOrigin().spec()); | |
115 replication_state_.is_unique_origin = false; | |
116 } | |
117 | |
99 } // namespace content | 118 } // namespace content |
OLD | NEW |