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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1424263003: Reland "Use resource throttle to implement shouldOverrideUrlLoading, core change" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary change for making XHR test thread-safe (it was safe before the change). Created 5 years, 1 month 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
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 4372 matching lines...) Expand 10 before | Expand all | Expand 10 after
4383 info.extraData 4383 info.extraData
4384 ? static_cast<DocumentState*>(info.extraData) 4384 ? static_cast<DocumentState*>(info.extraData)
4385 ->navigation_state() 4385 ->navigation_state()
4386 ->IsContentInitiated() 4386 ->IsContentInitiated()
4387 : !IsBrowserInitiated(pending_navigation_params_.get()); 4387 : !IsBrowserInitiated(pending_navigation_params_.get());
4388 bool is_redirect = 4388 bool is_redirect =
4389 info.extraData || 4389 info.extraData ||
4390 (pending_navigation_params_ && 4390 (pending_navigation_params_ &&
4391 !pending_navigation_params_->request_params.redirects.empty()); 4391 !pending_navigation_params_->request_params.redirects.empty());
4392 4392
4393 #ifdef OS_ANDROID
4394 // The handlenavigation API is deprecated and will be removed once
4395 // crbug.com/325351 is resolved.
4396 if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
4397 GetContentClient()->renderer()->HandleNavigation(
4398 this, is_content_initiated, render_view_->opener_id_, frame_,
4399 info.urlRequest, info.navigationType, info.defaultPolicy,
4400 is_redirect)) {
4401 return blink::WebNavigationPolicyIgnore;
4402 }
4403 #endif
4404
4405 Referrer referrer( 4393 Referrer referrer(
4406 RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest)); 4394 RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest));
4407 4395
4408 // TODO(nick): Is consulting |is_main_frame| here correct? 4396 // TODO(nick): Is consulting |is_main_frame| here correct?
4409 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && !is_main_frame_) { 4397 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && !is_main_frame_) {
4410 // There's no reason to ignore navigations on subframes, since the swap out 4398 // There's no reason to ignore navigations on subframes, since the swap out
4411 // logic no longer applies. 4399 // logic no longer applies.
4412 } else { 4400 } else {
4413 if (is_swapped_out_) { 4401 if (is_swapped_out_) {
4414 if (info.urlRequest.url() != GURL(kSwappedOutURL)) { 4402 if (info.urlRequest.url() != GURL(kSwappedOutURL)) {
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
5312 mojo::ServiceProviderPtr service_provider; 5300 mojo::ServiceProviderPtr service_provider;
5313 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5301 mojo::URLRequestPtr request(mojo::URLRequest::New());
5314 request->url = mojo::String::From(url); 5302 request->url = mojo::String::From(url);
5315 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5303 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5316 nullptr, nullptr, 5304 nullptr, nullptr,
5317 base::Bind(&OnGotContentHandlerID)); 5305 base::Bind(&OnGotContentHandlerID));
5318 return service_provider.Pass(); 5306 return service_provider.Pass();
5319 } 5307 }
5320 5308
5321 } // namespace content 5309 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698