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

Unified Diff: components/password_manager/core/browser/login_database.cc

Issue 1734193003: CREDENTIAL: Disable auto sign-in by default for existing credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: components/password_manager/core/browser/login_database.cc
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
index 6221472f9488f2ca0a1740070064ee16b3a00704..837f63457d468a4ff7c488284ad726babb0d27a6 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -39,7 +39,7 @@ using autofill::PasswordForm;
namespace password_manager {
// The current version number of the login database schema.
-const int kCurrentVersionNumber = 16;
+const int kCurrentVersionNumber = 17;
// The oldest version of the schema such that a legacy Chrome client using that
// version can still read/write the current database.
const int kCompatibleVersionNumber = 14;
@@ -619,6 +619,13 @@ bool LoginDatabase::MigrateOldVersionsAsNeeded() {
// Recreate the statistics.
if (!stats_table_.MigrateToVersion(16))
return false;
+ case 16: {
+ // No change in scheme: just disable auto sign-in by default in
+ // preparation to launch the credential management API.
+ if (!db_.Execute("UPDATE logins SET skip_zero_click = 1"))
+ return false;
+ // Fall through.
+ }
// -------------------------------------------------------------------------
// DO NOT FORGET to update |kCompatibleVersionNumber| if you add a migration

Powered by Google App Engine
This is Rietveld 408576698