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

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: Added unittest 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(
230 NavigationEntry* navigation_entry) {
230 navigation_handle_ = NavigationHandleImpl::Create( 231 navigation_handle_ = NavigationHandleImpl::Create(
231 common_params_.url, frame_tree_node_, common_params_.navigation_start); 232 common_params_.url, frame_tree_node_, common_params_.navigation_start,
233 navigation_entry);
232 } 234 }
233 235
234 void NavigationRequest::TransferNavigationHandleOwnership( 236 void NavigationRequest::TransferNavigationHandleOwnership(
235 RenderFrameHostImpl* render_frame_host) { 237 RenderFrameHostImpl* render_frame_host) {
236 render_frame_host->SetNavigationHandle(std::move(navigation_handle_)); 238 render_frame_host->SetNavigationHandle(std::move(navigation_handle_));
237 } 239 }
238 240
239 void NavigationRequest::OnRequestRedirected( 241 void NavigationRequest::OnRequestRedirected(
240 const net::RedirectInfo& redirect_info, 242 const net::RedirectInfo& redirect_info,
241 const scoped_refptr<ResourceResponse>& response) { 243 const scoped_refptr<ResourceResponse>& response) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 browser_context, navigating_frame_host->GetSiteInstance()); 356 browser_context, navigating_frame_host->GetSiteInstance());
355 DCHECK(partition); 357 DCHECK(partition);
356 358
357 ServiceWorkerContextWrapper* service_worker_context = 359 ServiceWorkerContextWrapper* service_worker_context =
358 static_cast<ServiceWorkerContextWrapper*>( 360 static_cast<ServiceWorkerContextWrapper*>(
359 partition->GetServiceWorkerContext()); 361 partition->GetServiceWorkerContext());
360 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 362 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
361 } 363 }
362 364
363 } // namespace content 365 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698