Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc | 
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc | 
| index 9f8ead4de7efb356d6347ef948bf3893dc96026c..660dccd557979ec83661ec1b9e53b3be72333ec8 100644 | 
| --- a/content/browser/frame_host/render_frame_host_impl.cc | 
| +++ b/content/browser/frame_host/render_frame_host_impl.cc | 
| @@ -813,8 +813,12 @@ void RenderFrameHostImpl::OnCreateChildFrame( | 
| int new_routing_id, | 
| blink::WebTreeScopeType scope, | 
| const std::string& frame_name, | 
| + const std::string& frame_unique_name, | 
| blink::WebSandboxFlags sandbox_flags, | 
| const blink::WebFrameOwnerProperties& frame_owner_properties) { | 
| + // TODO(lukasza): Call ReceivedBadMessage when |frame_unique_name| is empty? | 
| 
 
Charlie Reis
2016/02/11 22:02:14
Yep, that'll be useful down the road.  You can mak
 
Łukasz Anforowicz
2016/02/11 23:23:56
Done.
 
 | 
| + DCHECK(!frame_unique_name.empty()); | 
| + | 
| // It is possible that while a new RenderFrameHost was committed, the | 
| // RenderFrame corresponding to this host sent an IPC message to create a | 
| // frame and it is delivered after this host is swapped out. | 
| @@ -824,7 +828,7 @@ void RenderFrameHostImpl::OnCreateChildFrame( | 
| return; | 
| frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(), new_routing_id, | 
| - scope, frame_name, sandbox_flags, | 
| + scope, frame_name, frame_unique_name, sandbox_flags, | 
| frame_owner_properties); | 
| } | 
| @@ -1411,9 +1415,10 @@ void RenderFrameHostImpl::OnDidChangeOpener(int32_t opener_routing_id) { | 
| GetSiteInstance()); | 
| } | 
| -void RenderFrameHostImpl::OnDidChangeName(const std::string& name) { | 
| +void RenderFrameHostImpl::OnDidChangeName(const std::string& name, | 
| + const std::string& unique_name) { | 
| std::string old_name = frame_tree_node()->frame_name(); | 
| - frame_tree_node()->SetFrameName(name); | 
| + frame_tree_node()->SetFrameName(name, unique_name); | 
| 
 
Charlie Reis
2016/02/11 22:02:14
Same TODO about BadMessageReceived?
 
Łukasz Anforowicz
2016/02/11 23:23:55
Hmmm... maybe I should add DCHECKs here to make it
 
 | 
| if (old_name.empty() && !name.empty()) | 
| frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 
| delegate_->DidChangeName(this, name); |