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

Unified Diff: chrome/browser/password_manager/password_store_x.cc

Issue 2866023: Linux: delete the unencrypted login database file after a successful password migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
Index: chrome/browser/password_manager/password_store_x.cc
===================================================================
--- chrome/browser/password_manager/password_store_x.cc (revision 51079)
+++ chrome/browser/password_manager/password_store_x.cc (working copy)
@@ -220,9 +220,13 @@
// where some fail. The only real problem with this is that we might
// leave passwords in the login database and never come back to clean
// them out if any of these calls do fail.
- // TODO(mdm): Really we should just delete the login database file.
PasswordStoreDefault::RemoveLoginImpl(*forms[i]);
}
+ // Finally, delete the database file itself. We remove the passwords from
+ // it before deleting the file just in case there is some problem deleting
+ // the file (e.g. directory is not writable, but file is), which would
+ // otherwise cause passwords to re-migrate next (or maybe every) time.
+ DeleteAndRecreateDatabaseFile();
}
}
ssize_t result = ok ? forms.size() : -1;
« no previous file with comments | « chrome/browser/password_manager/password_store_default.h ('k') | chrome/browser/password_manager/password_store_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698