summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 19:27:56 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 19:27:56 +0000
commitb3f7fe2e15beda8c077abe37d39f21332bde8add (patch)
tree82795f85cd727f388aa0b77431edd405f020aa29 /chrome/browser/background
parent2c17bf7e59eb7c6a3b987909d7f9fda948ff0014 (diff)
downloadchromium_src-b3f7fe2e15beda8c077abe37d39f21332bde8add.zip
chromium_src-b3f7fe2e15beda8c077abe37d39f21332bde8add.tar.gz
chromium_src-b3f7fe2e15beda8c077abe37d39f21332bde8add.tar.bz2
Don't close tabs from crashed extensions with background pages.
Make the crashed extension reload when the sad tab is reloaded. ('Extensions' includes packaged apps.) BUG=71629 BUG=94177 TEST=Added ExtensionCrashRecoveryTest.ReloadTabsWithBackgroundPage. Manually: Open a packaged app with a background page. Kill it from Task Manager. Its tab should not close. Reload the tab and it should show the app (and the crash notification bubble should be gone). Review URL: http://codereview.chromium.org/8496024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background')
-rw-r--r--chrome/browser/background/background_contents_service.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 58a210f..6e0c3eb 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -97,7 +97,7 @@ class CrashNotificationDelegate : public NotificationDelegate {
void ShowBalloon(const Extension* extension, Profile* profile) {
string16 message = l10n_util::GetStringFUTF16(
- extension->is_hosted_app() ? IDS_BACKGROUND_CRASHED_APP_BALLOON_MESSAGE :
+ extension->is_app() ? IDS_BACKGROUND_CRASHED_APP_BALLOON_MESSAGE :
IDS_BACKGROUND_CRASHED_EXTENSION_BALLOON_MESSAGE,
UTF8ToUTF16(extension->name()));
string16 content_url = DesktopNotificationService::CreateDataUrl(
@@ -298,8 +298,8 @@ void BackgroundContentsService::Observe(
}
case chrome::NOTIFICATION_EXTENSION_UNLOADED:
switch (content::Details<UnloadedExtensionInfo>(details)->reason) {
- // Intentionally fall through.
- case extension_misc::UNLOAD_REASON_DISABLE:
+ case extension_misc::UNLOAD_REASON_DISABLE: // Fall through.
+ case extension_misc::UNLOAD_REASON_TERMINATE: // Fall through.
case extension_misc::UNLOAD_REASON_UNINSTALL:
ShutdownAssociatedBackgroundContents(
ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)->