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

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

Issue 2053693002: WIP: Move 'Upgrade-Insecure-Requests' to the browser process. Base URL: https://chromium.googlesource.com/chromium/src.git@replicate
Patch Set: Created 4 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 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // and verifies that all origins are PSL-matches (and special-cases extension 181 // and verifies that all origins are PSL-matches (and special-cases extension
182 // URLs). 182 // URLs).
183 const GURL& first_party_for_cookies = 183 const GURL& first_party_for_cookies =
184 frame_tree_node->IsMainFrame() 184 frame_tree_node->IsMainFrame()
185 ? common_params.url 185 ? common_params.url
186 : frame_tree_node->frame_tree()->root()->current_url(); 186 : frame_tree_node->frame_tree()->root()->current_url();
187 bool parent_is_main_frame = !frame_tree_node->parent() ? 187 bool parent_is_main_frame = !frame_tree_node->parent() ?
188 false : frame_tree_node->parent()->IsMainFrame(); 188 false : frame_tree_node->parent()->IsMainFrame();
189 info_.reset(new NavigationRequestInfo( 189 info_.reset(new NavigationRequestInfo(
190 common_params, begin_params, first_party_for_cookies, 190 common_params, begin_params, first_party_for_cookies,
191 frame_tree_node->current_origin(), frame_tree_node->IsMainFrame(), 191 frame_tree_node->current_origin(),
192 parent_is_main_frame, frame_tree_node->frame_tree_node_id())); 192 frame_tree_node->upgrades_insecure_requests(),
193 frame_tree_node->IsMainFrame(), parent_is_main_frame,
194 frame_tree_node->frame_tree_node_id()));
193 } 195 }
194 196
195 NavigationRequest::~NavigationRequest() { 197 NavigationRequest::~NavigationRequest() {
196 } 198 }
197 199
198 void NavigationRequest::BeginNavigation() { 200 void NavigationRequest::BeginNavigation() {
199 DCHECK(!loader_); 201 DCHECK(!loader_);
200 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE); 202 DCHECK(state_ == NOT_STARTED || state_ == WAITING_FOR_RENDERER_RESPONSE);
201 state_ = STARTED; 203 state_ = STARTED;
202 RenderFrameDevToolsAgentHost::OnBeforeNavigation(navigation_handle_.get()); 204 RenderFrameDevToolsAgentHost::OnBeforeNavigation(navigation_handle_.get());
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 browser_context, navigating_frame_host->GetSiteInstance()); 460 browser_context, navigating_frame_host->GetSiteInstance());
459 DCHECK(partition); 461 DCHECK(partition);
460 462
461 ServiceWorkerContextWrapper* service_worker_context = 463 ServiceWorkerContextWrapper* service_worker_context =
462 static_cast<ServiceWorkerContextWrapper*>( 464 static_cast<ServiceWorkerContextWrapper*>(
463 partition->GetServiceWorkerContext()); 465 partition->GetServiceWorkerContext());
464 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 466 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
465 } 467 }
466 468
467 } // namespace content 469 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698