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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1159143008: Fix wrong initialization of renderer_initiated_creation parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing mmenke@'s comments Created 5 years, 6 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 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/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 // are created with their RenderView, and same-site iframes are created at the 645 // are created with their RenderView, and same-site iframes are created at the
646 // time of OnCreateChildFrame. 646 // time of OnCreateChildFrame.
647 SetRenderFrameCreated(true); 647 SetRenderFrameCreated(true);
648 648
649 return true; 649 return true;
650 } 650 }
651 651
652 bool RenderFrameHostImpl::IsRenderFrameLive() { 652 bool RenderFrameHostImpl::IsRenderFrameLive() {
653 bool is_live = GetProcess()->HasConnection() && render_frame_created_; 653 bool is_live = GetProcess()->HasConnection() && render_frame_created_;
654 654
655 // If the process is for an isolated guest (e.g. <webview>), rely on the
656 // RenderViewHost liveness check. Once https://crbug.com/492830 is fixed,
657 // this can be removed.
658 if (GetProcess()->IsIsolatedGuest())
659 is_live = render_view_host_->IsRenderViewLive();
660
661 // Sanity check: the RenderView should always be live if the RenderFrame is. 655 // Sanity check: the RenderView should always be live if the RenderFrame is.
662 DCHECK_IMPLIES(is_live, render_view_host_->IsRenderViewLive()); 656 DCHECK_IMPLIES(is_live, render_view_host_->IsRenderViewLive());
663 657
664 return is_live; 658 return is_live;
665 } 659 }
666 660
667 void RenderFrameHostImpl::SetRenderFrameCreated(bool created) { 661 void RenderFrameHostImpl::SetRenderFrameCreated(bool created) {
668 bool was_created = render_frame_created_; 662 bool was_created = render_frame_created_;
669 render_frame_created_ = created; 663 render_frame_created_ = created;
670 664
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 // We may be returning to an existing NavigationEntry that had been granted 2065 // We may be returning to an existing NavigationEntry that had been granted
2072 // file access. If this is a different process, we will need to grant the 2066 // file access. If this is a different process, we will need to grant the
2073 // access again. The files listed in the page state are validated when they 2067 // access again. The files listed in the page state are validated when they
2074 // are received from the renderer to prevent abuse. 2068 // are received from the renderer to prevent abuse.
2075 if (request_params.page_state.IsValid()) { 2069 if (request_params.page_state.IsValid()) {
2076 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); 2070 render_view_host_->GrantFileAccessFromPageState(request_params.page_state);
2077 } 2071 }
2078 } 2072 }
2079 2073
2080 } // namespace content 2074 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698