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

Unified Diff: chrome/browser/tab_contents/render_view_host_manager.cc

Issue 3263007: Reland r57788 - Expose Extension Bindings to Component Applications (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: don't hide gallery url in omnibar Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/background_contents.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_host_manager.cc
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc
index e5f74260a01c277ed4a82fd0ba5a3ad8abe52705..d30b7d31cfcdc0fd4ffa1d1efd6ba02584001662 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager.cc
@@ -309,8 +309,9 @@ bool RenderViewHostManager::ShouldSwapProcessesForNavigation(
// For security, we should transition between processes when one is a DOM UI
// page and one isn't.
- if (DOMUIFactory::UseDOMUIForURL(cur_entry->url()) !=
- DOMUIFactory::UseDOMUIForURL(new_entry->url()))
+ Profile* profile = delegate_->GetControllerForRenderManager().profile();
+ if (DOMUIFactory::UseDOMUIForURL(profile, cur_entry->url()) !=
+ DOMUIFactory::UseDOMUIForURL(profile, new_entry->url()))
return true;
// Also, we must switch if one is an extension and the other is not the exact
@@ -472,14 +473,8 @@ bool RenderViewHostManager::InitRenderView(RenderViewHost* render_view_host,
// Tell the RenderView whether it will be used for an extension process.
Profile* profile = delegate_->GetControllerForRenderManager().profile();
- bool is_extension_process = false;
- if (entry.url().SchemeIs(chrome::kExtensionScheme)) {
- is_extension_process = true;
- } else if (profile->GetExtensionsService() &&
- profile->GetExtensionsService()->
- GetExtensionByWebExtent(entry.url())) {
- is_extension_process = true;
- }
+ bool is_extension_process = profile->GetExtensionsService() &&
+ profile->GetExtensionsService()->ExtensionBindingsAllowed(entry.url());
render_view_host->set_is_extension_process(is_extension_process);
return delegate_->CreateRenderViewForRenderManager(render_view_host);
« no previous file with comments | « chrome/browser/tab_contents/background_contents.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698