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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2386503002: With --isolate-extensions, forking (via OpenURL) for extensions is not needed.
Patch Set: Rebasing... Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 // process if it is an Instant url, or to another process if not. Conversely, 1132 // process if it is an Instant url, or to another process if not. Conversely,
1133 // fork if this is a non-Instant process navigating to an Instant url, so that 1133 // fork if this is a non-Instant process navigating to an Instant url, so that
1134 // such navigations can also be bucketed into an Instant renderer. 1134 // such navigations can also be bucketed into an Instant renderer.
1135 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1135 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1136 switches::kInstantProcess) || 1136 switches::kInstantProcess) ||
1137 SearchBouncer::GetInstance()->ShouldFork(url)) { 1137 SearchBouncer::GetInstance()->ShouldFork(url)) {
1138 *send_referrer = true; 1138 *send_referrer = true;
1139 return true; 1139 return true;
1140 } 1140 }
1141 1141
1142 // TODO(lukasza): https://crbug.com/650694: For now, we skip the rest for POST
1143 // submissions. This is because 1) in M54 there are some remaining issues
1144 // with POST in OpenURL path (e.g. https://crbug.com/648648) and 2) OpenURL
1145 // path regresses (blocks) navigations that result in downloads
1146 // (https://crbug.com/646261). In the long-term we should avoid forking for
1147 // extensions (not hosted apps though) altogether and rely on transfers logic
1148 // instead.
1149 if (http_method != "GET")
1150 return false;
1151
1152 // If |url| matches one of the prerendered URLs, stop this navigation and try 1142 // If |url| matches one of the prerendered URLs, stop this navigation and try
1153 // to swap in the prerendered page on the browser process. If the prerendered 1143 // to swap in the prerendered page on the browser process. If the prerendered
1154 // page no longer exists by the time the OpenURL IPC is handled, a normal 1144 // page no longer exists by the time the OpenURL IPC is handled, a normal
1155 // navigation is attempted. 1145 // navigation is attempted.
1156 if (prerender_dispatcher_.get() && 1146 if (prerender_dispatcher_.get() &&
1157 prerender_dispatcher_->IsPrerenderURL(url)) { 1147 prerender_dispatcher_->IsPrerenderURL(url)) {
1158 *send_referrer = true; 1148 *send_referrer = true;
1159 return true; 1149 return true;
1160 } 1150 }
1161 1151
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 1544
1555 RecordYouTubeRewriteUMA(result); 1545 RecordYouTubeRewriteUMA(result);
1556 return corrected_url.ReplaceComponents(r); 1546 return corrected_url.ReplaceComponents(r);
1557 } 1547 }
1558 1548
1559 std::unique_ptr<base::TaskScheduler::InitParams> 1549 std::unique_ptr<base::TaskScheduler::InitParams>
1560 ChromeContentRendererClient::GetTaskSchedulerInitParams() { 1550 ChromeContentRendererClient::GetTaskSchedulerInitParams() {
1561 return task_scheduler_util:: 1551 return task_scheduler_util::
1562 GetRendererTaskSchedulerInitParamsFromCommandLine(); 1552 GetRendererTaskSchedulerInitParamsFromCommandLine();
1563 } 1553 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_process_policy.cc ('k') | chrome/renderer/extensions/chrome_extensions_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698