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

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

Issue 1375883002: Support Android username-only credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 62194a5482c57a70b9e023460e77db7041bdaf7e..fbcab7b743d8ce4ec1c1a7f4b44197d30d45cc1d 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -1014,7 +1014,8 @@ LoginDatabase::EncryptionResult LoginDatabase::InitPasswordFormFromStatement(
base::Time::FromInternalValue(s.ColumnInt64(COLUMN_DATE_CREATED));
form->blacklisted_by_user = (s.ColumnInt(COLUMN_BLACKLISTED_BY_USER) > 0);
int scheme_int = s.ColumnInt(COLUMN_SCHEME);
- DCHECK((scheme_int >= 0) && (scheme_int <= PasswordForm::SCHEME_OTHER));
+ DCHECK_LE(0, scheme_int);
+ DCHECK_GE(PasswordForm::SCHEME_LAST, scheme_int);
form->scheme = static_cast<PasswordForm::Scheme>(scheme_int);
int type_int = s.ColumnInt(COLUMN_PASSWORD_TYPE);
DCHECK(type_int >= 0 && type_int <= PasswordForm::TYPE_GENERATED);

Powered by Google App Engine
This is Rietveld 408576698