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

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

Issue 1964863002: Persist prompt/block download limiter state on renderer-initiated loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement DidFinishNavigation Created 4 years, 7 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 "content/browser/frame_host/navigation_request.h" 5 #include "content/browser/frame_host/navigation_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); 230 frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this);
231 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, 231 NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host,
232 common_params_.url); 232 common_params_.url);
233 233
234 // Inform the NavigationHandle that the navigation will commit. 234 // Inform the NavigationHandle that the navigation will commit.
235 navigation_handle_->ReadyToCommitNavigation(render_frame_host); 235 navigation_handle_->ReadyToCommitNavigation(render_frame_host);
236 236
237 CommitNavigation(); 237 CommitNavigation();
238 } 238 }
239 239
240 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) { 240 void NavigationRequest::CreateNavigationHandle(bool is_renderer_initiated,
241 int pending_nav_entry_id) {
241 // TODO(nasko): Update the NavigationHandle creation to ensure that the 242 // TODO(nasko): Update the NavigationHandle creation to ensure that the
242 // proper values are specified for is_synchronous and is_srcdoc. 243 // proper values are specified for is_synchronous and is_srcdoc.
243 navigation_handle_ = NavigationHandleImpl::Create( 244 navigation_handle_ = NavigationHandleImpl::Create(
244 common_params_.url, frame_tree_node_, 245 common_params_.url, frame_tree_node_,
246 is_renderer_initiated,
245 false, // is_synchronous 247 false, // is_synchronous
246 false, // is_srcdoc 248 false, // is_srcdoc
247 common_params_.navigation_start, pending_nav_entry_id); 249 common_params_.navigation_start, pending_nav_entry_id);
248 } 250 }
249 251
250 void NavigationRequest::TransferNavigationHandleOwnership( 252 void NavigationRequest::TransferNavigationHandleOwnership(
251 RenderFrameHostImpl* render_frame_host) { 253 RenderFrameHostImpl* render_frame_host) {
252 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); 254 render_frame_host->SetNavigationHandle(std::move(navigation_handle_));
253 } 255 }
254 256
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 browser_context, navigating_frame_host->GetSiteInstance()); 455 browser_context, navigating_frame_host->GetSiteInstance());
454 DCHECK(partition); 456 DCHECK(partition);
455 457
456 ServiceWorkerContextWrapper* service_worker_context = 458 ServiceWorkerContextWrapper* service_worker_context =
457 static_cast<ServiceWorkerContextWrapper*>( 459 static_cast<ServiceWorkerContextWrapper*>(
458 partition->GetServiceWorkerContext()); 460 partition->GetServiceWorkerContext());
459 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 461 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
460 } 462 }
461 463
462 } // namespace content 464 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698