Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
index 61f6d69326e57659657f7b97e667960d4e1112db..701fbcc5ac12d22b4b148d4e4910d292fba5f868 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
@@ -23,6 +23,8 @@ |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
#include "chrome/browser/defaults.h" |
+#include "chrome/browser/extensions/app_restore_service.h" |
+#include "chrome/browser/extensions/app_restore_service_factory.h" |
#include "chrome/browser/extensions/extension_creator.h" |
#include "chrome/browser/extensions/extension_service.h" |
#include "chrome/browser/extensions/pack_extension_job.h" |
@@ -598,6 +600,10 @@ bool StartupBrowserCreatorImpl::ProcessStartupURLs( |
else if (pref.type == SessionStartupPref::DEFAULT) |
VLOG(1) << "Pref: default"; |
+ // The only time apps get restored is when the browser process is restarted. |
+ if (StartupBrowserCreator::WasRestarted()) |
+ AppRestoreServiceFactory::GetForProfile(profile_)->RestoreApps(); |
+ |
if (pref.type == SessionStartupPref::LAST) { |
if (!profile_->DidLastSessionExitCleanly() && |
!command_line_.HasSwitch(switches::kRestoreLastSession)) { |