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

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

Issue 10855022: Remove the effects of --disable-restore-session-state. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Test update. 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
« no previous file with comments | « chrome/browser/sessions/base_session_service.h ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/base_session_service.cc
diff --git a/chrome/browser/sessions/base_session_service.cc b/chrome/browser/sessions/base_session_service.cc
index bc63250fbd22e9b571b5a2aa53f320e6fbe10b3f..426b147c0a9b0510a1401233eba7eaf78c6d5a81 100644
--- a/chrome/browser/sessions/base_session_service.cc
+++ b/chrome/browser/sessions/base_session_service.cc
@@ -75,14 +75,10 @@ BaseSessionService::BaseSessionService(SessionType type,
: profile_(profile),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
pending_reset_(false),
- commands_since_reset_(0),
- save_post_data_(false) {
+ commands_since_reset_(0) {
if (profile) {
// We should never be created when incognito.
DCHECK(!profile->IsOffTheRecord());
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
- save_post_data_ =
- !command_line->HasSwitch(switches::kDisableRestoreSessionState);
}
backend_ = new SessionBackend(type, profile_ ? profile_->GetPath() : path);
DCHECK(backend_.get());
@@ -175,13 +171,8 @@ SessionCommand* BaseSessionService::CreateUpdateTabNavigationCommand(
std::string content_state = entry.GetContentState();
if (entry.GetHasPostData()) {
- if (save_post_data_) {
- content_state =
- webkit_glue::RemovePasswordDataFromHistoryState(content_state);
- } else {
- content_state =
- webkit_glue::RemoveFormDataFromHistoryState(content_state);
- }
+ content_state =
+ webkit_glue::RemovePasswordDataFromHistoryState(content_state);
}
WriteStringToPickle(pickle, &bytes_written, max_state_size, content_state);
« no previous file with comments | « chrome/browser/sessions/base_session_service.h ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698