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

Unified Diff: chrome/browser/sessions/session_backend.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/sessions/session_backend.cc
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index bbb41035c67e4b701ece5c1bd2e20da9cd22f8aa..8afdca0f505e51473bbad9d5473635aecc87a2ca 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -202,6 +202,10 @@ bool SessionFileReader::FillBuffer() {
static const char* kCurrentTabSessionFileName = "Current Tabs";
static const char* kLastTabSessionFileName = "Last Tabs";
+// File names (current and previous) for a type of APP.
+static const char* kCurrentAppSessionFileName = "Current Apps";
+static const char* kLastAppSessionFileName = "Last Apps";
+
// File names (current and previous) for a type of SESSION.
static const char* kCurrentSessionFileName = "Current Session";
static const char* kLastSessionFileName = "Last Session";
@@ -406,6 +410,8 @@ FilePath SessionBackend::GetLastSessionPath() {
FilePath path = path_to_dir_;
if (type_ == BaseSessionService::TAB_RESTORE)
path = path.AppendASCII(kLastTabSessionFileName);
+ else if (type_ == BaseSessionService::APP_RESTORE)
+ path = path.AppendASCII(kLastAppSessionFileName);
else
path = path.AppendASCII(kLastSessionFileName);
return path;
@@ -415,6 +421,8 @@ FilePath SessionBackend::GetCurrentSessionPath() {
FilePath path = path_to_dir_;
if (type_ == BaseSessionService::TAB_RESTORE)
path = path.AppendASCII(kCurrentTabSessionFileName);
+ else if (type_ == BaseSessionService::APP_RESTORE)
+ path = path.AppendASCII(kCurrentAppSessionFileName);
else
path = path.AppendASCII(kCurrentSessionFileName);
return path;

Powered by Google App Engine
This is Rietveld 408576698