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

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

Issue 2411693003: Move blocking of top-level navigations to nested URLs with extension origins from non-extension pro… (Closed)
Patch Set: Created 4 years, 2 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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 int pending_nav_entry_id = 0; 188 int pending_nav_entry_id = 0;
189 bool started_from_context_menu = false; 189 bool started_from_context_menu = false;
190 NavigationEntryImpl* pending_entry = controller_->GetPendingEntry(); 190 NavigationEntryImpl* pending_entry = controller_->GetPendingEntry();
191 if (pending_entry) { 191 if (pending_entry) {
192 is_renderer_initiated = pending_entry->is_renderer_initiated(); 192 is_renderer_initiated = pending_entry->is_renderer_initiated();
193 pending_nav_entry_id = pending_entry->GetUniqueID(); 193 pending_nav_entry_id = pending_entry->GetUniqueID();
194 started_from_context_menu = pending_entry->has_started_from_context_menu(); 194 started_from_context_menu = pending_entry->has_started_from_context_menu();
195 } 195 }
196 196
197 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create( 197 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create(
198 validated_url, render_frame_host->frame_tree_node(), 198 validated_url,
199 render_frame_host->GetSiteInstance()->GetSiteURL(),
alexmos 2016/10/12 17:18:16 Similar concern here about whether this picks the
200 render_frame_host->frame_tree_node(),
199 is_renderer_initiated, 201 is_renderer_initiated,
200 false, // is_synchronous 202 false, // is_synchronous
201 is_iframe_srcdoc, // is_srcdoc 203 is_iframe_srcdoc, // is_srcdoc
202 navigation_start, pending_nav_entry_id, started_from_context_menu)); 204 navigation_start, pending_nav_entry_id, started_from_context_menu));
203 } 205 }
204 206
205 void NavigatorImpl::DidFailProvisionalLoadWithError( 207 void NavigatorImpl::DidFailProvisionalLoadWithError(
206 RenderFrameHostImpl* render_frame_host, 208 RenderFrameHostImpl* render_frame_host,
207 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { 209 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {
208 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec() 210 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec()
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 if (navigation_handle) 1235 if (navigation_handle)
1234 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); 1236 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID());
1235 1237
1236 controller_->SetPendingEntry(std::move(entry)); 1238 controller_->SetPendingEntry(std::move(entry));
1237 if (delegate_) 1239 if (delegate_)
1238 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1240 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1239 } 1241 }
1240 } 1242 }
1241 1243
1242 } // namespace content 1244 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698