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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 9169065: Reloading page after installing app should bring it into correct process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing initial code review comments. Created 8 years, 11 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
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index e76a03d5934018781cb6d57e6078af298efcf3b7..44155727ea1b9257fdb591b4f156c9b2f8fcc02f 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -761,6 +761,16 @@ bool ChromeContentRendererClient::CrossesExtensionExtents(
const Extension* new_url_extension = extensions::GetNonBookmarkAppExtension(
*extensions, ExtensionURLInfo(new_url));
+ // If this is a reload, check whether it has the wrong process type. We
+ // should send it to the browser if it's an extension URL (e.g., hosted app)
+ // in a normal process, or if it's a process for an extension that has been
+ // uninstalled.
+ if (old_url == new_url) {
+ bool is_extension_url = !!new_url_extension;
+ if (is_extension_url != extension_dispatcher_->is_extension_process())
+ return true;
+ }
+
// If old_url is still empty and this is an initial navigation, then this is
// a window.open operation. We should look at the opener URL.
if (is_initial_navigation && old_url.is_empty() && frame->opener()) {

Powered by Google App Engine
This is Rietveld 408576698