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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 11638053: Make crash bubble send onRestarted() to apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index bb25f9bc450cf620bd27f519a3e340ad03dd7b42..173b10b271475cf3b92d647be175a4b12fdabb27 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -65,6 +65,7 @@ class CrashNotificationDelegate : public NotificationDelegate {
const Extension* extension)
: profile_(profile),
is_hosted_app_(extension->is_hosted_app()),
+ is_platform_app_(extension->is_platform_app()),
extension_id_(extension->id()) {
}
@@ -83,6 +84,9 @@ class CrashNotificationDelegate : public NotificationDelegate {
BackgroundContentsServiceFactory::GetForProfile(profile_);
if (!service->GetAppBackgroundContents(ASCIIToUTF16(extension_id_)))
service->LoadBackgroundContentsForExtension(profile_, extension_id_);
+ } else if (is_platform_app_) {
+ extensions::ExtensionSystem::Get(profile_)->extension_service()->
+ RestartExtension(extension_id_);
} else {
extensions::ExtensionSystem::Get(profile_)->extension_service()->
ReloadExtension(extension_id_);
@@ -106,6 +110,7 @@ class CrashNotificationDelegate : public NotificationDelegate {
Profile* profile_;
bool is_hosted_app_;
+ bool is_platform_app_;
std::string extension_id_;
DISALLOW_COPY_AND_ASSIGN(CrashNotificationDelegate);
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698