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

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

Issue 1661423002: Solidify Entry discarding logic (NavigationHandle keeps its ID) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + creis review Created 4 years, 10 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/frame_host/frame_tree.h" 9 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return; 219 return;
220 } 220 }
221 221
222 // There is no need to make a network request for this navigation, so commit 222 // There is no need to make a network request for this navigation, so commit
223 // it immediately. 223 // it immediately.
224 state_ = RESPONSE_STARTED; 224 state_ = RESPONSE_STARTED;
225 frame_tree_node_->navigator()->CommitNavigation( 225 frame_tree_node_->navigator()->CommitNavigation(
226 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>()); 226 frame_tree_node_, nullptr, scoped_ptr<StreamHandle>());
227 } 227 }
228 228
229 void NavigationRequest::CreateNavigationHandle() { 229 void NavigationRequest::CreateNavigationHandle(int pending_nav_entry_id) {
230 // TODO(nasko): Update the NavigationHandle creation to ensure that the 230 // TODO(nasko): Update the NavigationHandle creation to ensure that the
231 // proper values are specified for is_synchronous and is_srcdoc. 231 // proper values are specified for is_synchronous and is_srcdoc.
232 navigation_handle_ = 232 navigation_handle_ =
233 NavigationHandleImpl::Create(common_params_.url, frame_tree_node_, 233 NavigationHandleImpl::Create(common_params_.url, frame_tree_node_,
234 false, // is_synchronous 234 false, // is_synchronous
235 false, // is_srcdoc 235 false, // is_srcdoc
236 common_params_.navigation_start); 236 common_params_.navigation_start,
237 pending_nav_entry_id);
237 } 238 }
238 239
239 void NavigationRequest::TransferNavigationHandleOwnership( 240 void NavigationRequest::TransferNavigationHandleOwnership(
240 RenderFrameHostImpl* render_frame_host) { 241 RenderFrameHostImpl* render_frame_host) {
241 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); 242 render_frame_host->SetNavigationHandle(std::move(navigation_handle_));
242 } 243 }
243 244
244 void NavigationRequest::OnRequestRedirected( 245 void NavigationRequest::OnRequestRedirected(
245 const net::RedirectInfo& redirect_info, 246 const net::RedirectInfo& redirect_info,
246 const scoped_refptr<ResourceResponse>& response) { 247 const scoped_refptr<ResourceResponse>& response) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 browser_context, navigating_frame_host->GetSiteInstance()); 359 browser_context, navigating_frame_host->GetSiteInstance());
359 DCHECK(partition); 360 DCHECK(partition);
360 361
361 ServiceWorkerContextWrapper* service_worker_context = 362 ServiceWorkerContextWrapper* service_worker_context =
362 static_cast<ServiceWorkerContextWrapper*>( 363 static_cast<ServiceWorkerContextWrapper*>(
363 partition->GetServiceWorkerContext()); 364 partition->GetServiceWorkerContext());
364 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 365 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
365 } 366 }
366 367
367 } // namespace content 368 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698