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

Unified Diff: chrome/browser/sessions/session_service.h

Issue 8533013: SessionRestore: Store session cookies and restore them if chrome crashes or auto-restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 9 years, 1 month 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_service.h
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 6cbe60f36c32e9886b9cac2ee864ac929b71aac6..248076c35a696d0ffa5bc14f548b8a3ccb764687 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -184,7 +184,12 @@ class SessionService : public BaseSessionService,
// session update activities.
virtual void Save() OVERRIDE;
+ // Restores or resets the session state, such as session cookies.
+ void RestoreOrResetSessionState(bool restore);
+
private:
+ class SessionCookieStore;
+
typedef std::map<SessionID::id_type, std::pair<int, int> > IdToRange;
typedef std::map<SessionID::id_type, SessionTab*> IdToSessionTab;
typedef std::map<SessionID::id_type, SessionWindow*> IdToSessionWindow;
@@ -455,6 +460,13 @@ class SessionService : public BaseSessionService,
const base::TimeDelta save_delay_in_mins_;
const base::TimeDelta save_delay_in_hrs_;
+ // Stores the value of the command line switch enable-restore-session-data. If
+ // the flag is on, session data (such as cookies) are saved, and restored
+ // after a restart or a crash.
+ bool enable_restore_session_data_;
+
+ scoped_refptr<SessionCookieStore> session_cookie_store_;
+
DISALLOW_COPY_AND_ASSIGN(SessionService);
};

Powered by Google App Engine
This is Rietveld 408576698