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

Unified Diff: chrome/browser/background_contents_service.cc

Issue 6297002: Preserve hosted apps' background contents across reload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed spelling of "intentionally". Created 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background_contents_service.cc
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc
index df6db030e7d882dd47126185a60f7a64774b60db..38e3e9a95968a500426e340e0ce2c8327dc1394c 100644
--- a/chrome/browser/background_contents_service.cc
+++ b/chrome/browser/background_contents_service.cc
@@ -113,10 +113,21 @@ void BackgroundContentsService::Observe(NotificationType type,
DCHECK(IsTracked(Details<BackgroundContents>(details).ptr()));
RegisterBackgroundContents(Details<BackgroundContents>(details).ptr());
break;
- case NotificationType::EXTENSION_UNLOADED:
- ShutdownAssociatedBackgroundContents(
- ASCIIToUTF16(
- Details<UnloadedExtensionInfo>(details)->extension->id()));
+ case NotificationType::EXTENSION_UNLOADED:
+ switch (Details<UnloadedExtensionInfo>(details)->reason) {
+ case UnloadedExtensionInfo::DISABLE: // Intentionally fall through.
+ case UnloadedExtensionInfo::UNINSTALL:
+ ShutdownAssociatedBackgroundContents(
+ ASCIIToUTF16(
+ Details<UnloadedExtensionInfo>(details)->extension->id()));
+ break;
+ case UnloadedExtensionInfo::UPDATE:
+ // Leave background content in place
Andrew T Wilson (Slow) 2011/01/14 01:41:34 nit: should be "BackgroundContents" not "backgroun
The wrong rickcam account 2011/01/14 02:13:36 Done.
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
break;
default:
NOTREACHED();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698