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

Unified Diff: chrome/browser/sessions/tab_restore_service.cc

Issue 9985002: Allow SessionService to be disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed sky's comments Created 8 years, 9 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 | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/tab_restore_service.cc
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index 2fee862545e98a6200a60a252d13ca25373a034d..701b0a30db928c720aa4b1c22b32121937709d97 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -439,6 +439,11 @@ void TabRestoreService::LoadTabsFromLastSession() {
if (load_state_ != NOT_LOADED || entries_.size() == kMaxEntries)
return;
+#if !defined(ENABLE_SESSION_SERVICE)
+ // If sessions are not stored in the SessionService, default to
+ // |LOADED_LAST_SESSION| state.
+ load_state_ = LOADING | LOADED_LAST_SESSION;
+#else
load_state_ = LOADING;
SessionService* session_service =
@@ -455,6 +460,7 @@ void TabRestoreService::LoadTabsFromLastSession() {
} else {
load_state_ |= LOADED_LAST_SESSION;
}
+#endif
// Request the tabs closed in the last session. If the last session crashed,
// this won't contain the tabs/window that were open at the point of the
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698