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

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

Issue 42619: Fixes bug where first login attempt to hotmail after session restore... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | chrome/browser/sessions/session_service_unittest.cc » ('j') | webkit/glue/glue_serialize.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/base_session_service.cc
===================================================================
--- chrome/browser/sessions/base_session_service.cc (revision 12517)
+++ chrome/browser/sessions/base_session_service.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/common/stl_util-inl.h"
+#include "webkit/glue/webkit_glue.h"
// InternalGetCommandsRequest -------------------------------------------------
@@ -160,8 +161,14 @@
WriteWStringToPickle(pickle, &bytes_written, max_state_size,
UTF16ToWideHack(entry.title()));
- WriteStringToPickle(pickle, &bytes_written, max_state_size,
- entry.content_state());
+ if (entry.has_post_data()) {
+ // Remove the form data, it may contain sensitive information.
+ WriteStringToPickle(pickle, &bytes_written, max_state_size,
+ webkit_glue::RemoveFormDataFromHistoryState(entry.content_state()));
+ } else {
+ WriteStringToPickle(pickle, &bytes_written, max_state_size,
+ entry.content_state());
+ }
pickle.WriteInt(entry.transition_type());
int type_mask = entry.has_post_data() ? TabNavigation::HAS_POST_DATA : 0;
@@ -209,16 +216,11 @@
}
bool BaseSessionService::ShouldTrackEntry(const NavigationEntry& entry) {
- // Don't track entries that have post data. Post data may contain passwords
- // and other sensitive data users don't want stored to disk.
- return entry.display_url().is_valid() && !entry.has_post_data();
+ return entry.display_url().is_valid();
}
bool BaseSessionService::ShouldTrackEntry(const TabNavigation& navigation) {
- // Don't track entries that have post data. Post data may contain passwords
- // and other sensitive data users don't want stored to disk.
- return navigation.url().is_valid() &&
- (navigation.type_mask() & TabNavigation::HAS_POST_DATA) == 0;
+ return navigation.url().is_valid();
}
BaseSessionService::Handle BaseSessionService::ScheduleGetLastSessionCommands(
« no previous file with comments | « no previous file | chrome/browser/sessions/session_service_unittest.cc » ('j') | webkit/glue/glue_serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698