diff options
author | creis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 22:41:51 +0000 |
---|---|---|
committer | creis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 22:41:51 +0000 |
commit | b6316ceb33a16ecf80704735d56708d29fc4f1e1 (patch) | |
tree | cf07d6560b578da76c2d8757619ada5f03bf3e64 /chrome/common/extensions/extension_process_policy.cc | |
parent | 39a6d21d254773c175a852fc38aadc83a58aa17c (diff) | |
download | chromium_src-b6316ceb33a16ecf80704735d56708d29fc4f1e1.zip chromium_src-b6316ceb33a16ecf80704735d56708d29fc4f1e1.tar.gz chromium_src-b6316ceb33a16ecf80704735d56708d29fc4f1e1.tar.bz2 |
Exclude extensions and Chrome Web Store from hosted app process workaround.
BUG=59285
BUG=103263
TEST=Follow a link from a hosted app to an extension or the Chrome Web Store.
Review URL: http://codereview.chromium.org/8949021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_process_policy.cc')
-rw-r--r-- | chrome/common/extensions/extension_process_policy.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/chrome/common/extensions/extension_process_policy.cc b/chrome/common/extensions/extension_process_policy.cc index 1ebd040..edadd0f 100644 --- a/chrome/common/extensions/extension_process_policy.cc +++ b/chrome/common/extensions/extension_process_policy.cc @@ -26,14 +26,23 @@ bool CrossesExtensionProcessBoundary( const Extension* new_url_extension = GetNonBookmarkAppExtension(extensions, new_url); - // TODO(creis): Temporary workaround for crbug.com/59285: Only return true if - // we would enter an extension app's extent from a non-app, or if we leave an - // extension with no web extent. We avoid swapping processes to exit a hosted - // app for now, since we do not yet support postMessage calls from outside the - // app back into it (e.g., as in Facebook OAuth 2.0). + // TODO(creis): Temporary workaround for crbug.com/59285: Do not swap process + // to navigate from a hosted app to a normal page or another hosted app + // (unless either is the web store). This is because we do not yet support + // postMessage calls from outside the app back into it (e.g., as in Facebook + // OAuth 2.0). This will be removed when http://crbug.com/99202 is fixed. bool old_url_is_hosted_app = old_url_extension && !old_url_extension->web_extent().is_empty(); - if (old_url_is_hosted_app) + bool new_url_is_normal_or_hosted = !new_url_extension || + !new_url_extension->web_extent().is_empty(); + bool either_is_web_store = + (old_url_extension && + old_url_extension->id() == extension_misc::kWebStoreAppId) || + (new_url_extension && + new_url_extension->id() == extension_misc::kWebStoreAppId); + if (old_url_is_hosted_app && + new_url_is_normal_or_hosted && + !either_is_web_store) return false; return old_url_extension != new_url_extension; |