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

Side by Side Diff: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc

Issue 1867683002: Disarm LockToOrigin for extensions under --isolate-extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a stupid cast. Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/process_manager_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/extensions/chrome_content_browser_client_extensions_par t.h" 5 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par t.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // https://crbug.com/160576 workaround: Origin lock to the chrome-extension:// 211 // https://crbug.com/160576 workaround: Origin lock to the chrome-extension://
212 // scheme for a hosted app would kill processes on legitimate requests for the 212 // scheme for a hosted app would kill processes on legitimate requests for the
213 // app's cookies. 213 // app's cookies.
214 if (effective_site_url.SchemeIs(extensions::kExtensionScheme)) { 214 if (effective_site_url.SchemeIs(extensions::kExtensionScheme)) {
215 const Extension* extension = 215 const Extension* extension =
216 ExtensionRegistry::Get(browser_context) 216 ExtensionRegistry::Get(browser_context)
217 ->enabled_extensions() 217 ->enabled_extensions()
218 .GetExtensionOrAppByURL(effective_site_url); 218 .GetExtensionOrAppByURL(effective_site_url);
219 if (extension && extension->is_hosted_app()) 219 if (extension && extension->is_hosted_app())
220 return false; 220 return false;
221
222 // http://crbug.com/600441 workaround: Extension process reuse, implemented
223 // in ShouldTryToUseExistingProcessHost(), means that extension processes
224 // aren't always actually dedicated to a single origin, even in
225 // --isolate-extensions. TODO(nick): Fix this.
226 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
227 ::switches::kSitePerProcess))
228 return false;
221 } 229 }
222 return true; 230 return true;
223 } 231 }
224 232
225 // static 233 // static
226 bool ChromeContentBrowserClientExtensionsPart::CanCommitURL( 234 bool ChromeContentBrowserClientExtensionsPart::CanCommitURL(
227 content::RenderProcessHost* process_host, const GURL& url) { 235 content::RenderProcessHost* process_host, const GURL& url) {
228 DCHECK_CURRENTLY_ON(BrowserThread::UI); 236 DCHECK_CURRENTLY_ON(BrowserThread::UI);
229 237
230 // We need to let most extension URLs commit in any process, since this can 238 // We need to let most extension URLs commit in any process, since this can
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); 621 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding);
614 #endif 622 #endif
615 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 623 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
616 switches::kEnableMojoSerialService)) { 624 switches::kEnableMojoSerialService)) {
617 command_line->AppendSwitch(switches::kEnableMojoSerialService); 625 command_line->AppendSwitch(switches::kEnableMojoSerialService);
618 } 626 }
619 } 627 }
620 } 628 }
621 629
622 } // namespace extensions 630 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/process_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698