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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 9965012: Honor session content settings even if "continue where I left off" is selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only honor the "clear on exit", not session-only cookies. 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/chrome_content_browser_client.cc ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 0c894336d6b33b01f7fc0a6ce77261a70fbb01b9..772a0680871bc3fb8bcc7e1eb51dfd643e068265 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -560,15 +560,13 @@ ProfileImpl::~ProfileImpl() {
chrome::NOTIFICATION_PROFILE_DESTROYED,
content::Source<Profile>(this),
content::NotificationService::NoDetails());
- // Save the session state if we're going to restore the session during the
- // next startup.
SessionStartupPref pref = SessionStartupPref::GetStartupPref(this);
- if (pref.type == SessionStartupPref::LAST) {
- if (session_restore_enabled_)
- BrowserContext::SaveSessionState(this);
- } else if (clear_local_state_on_exit_) {
+ // Honor the "clear local state" setting. If it's not set, keep the session
+ // data if we're going to continue the session upon startup.
+ if (clear_local_state_on_exit_)
BrowserContext::ClearLocalOnDestruction(this);
- }
+ else if (session_restore_enabled_ && pref.type == SessionStartupPref::LAST)
+ BrowserContext::SaveSessionState(this);
StopCreateSessionServiceTimer();
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698