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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10875027: Restart running apps when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo Created 8 years, 4 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
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..2044fe8cc8ecdad821945daa4bf9da120f8a49df 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -40,6 +40,8 @@
#include "chrome/browser/protector/protector_service.h"
#include "chrome/browser/protector/protector_service_factory.h"
#include "chrome/browser/protector/protector_utils.h"
+#include "chrome/browser/sessions/app_restore_service.h"
+#include "chrome/browser/sessions/app_restore_service_factory.h"
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
@@ -598,6 +600,13 @@ bool StartupBrowserCreatorImpl::ProcessStartupURLs(
else if (pref.type == SessionStartupPref::DEFAULT)
VLOG(1) << "Pref: default";
+ LOG(ERROR) << "here";
Mihai Parparita -not on Chrome 2012/09/04 04:14:48 Remove these.
koz (OOO until 15th September) 2012/09/04 07:10:20 Done.
+ // The only time apps get restored is when the browser process is restarted.
+ if (StartupBrowserCreator::WasRestarted()) {
+ LOG(ERROR) << "here2";
+ AppRestoreServiceFactory::GetForProfile(profile_)->RestoreApps();
+ }
+
if (pref.type == SessionStartupPref::LAST) {
if (!profile_->DidLastSessionExitCleanly() &&
!command_line_.HasSwitch(switches::kRestoreLastSession)) {

Powered by Google App Engine
This is Rietveld 408576698