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

Unified Diff: components/autofill/core/common/password_form_fill_data.cc

Issue 1459973005: Reland of Use std::tie() for operator< in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/autofill/core/common/password_form_fill_data.cc
diff --git a/components/autofill/core/common/password_form_fill_data.cc b/components/autofill/core/common/password_form_fill_data.cc
index 148b5c2609d838cf467c853cfc2bd44a22a0ab76..1c35ba2bd83318cada9c2f72e050740c8592703a 100644
--- a/components/autofill/core/common/password_form_fill_data.cc
+++ b/components/autofill/core/common/password_form_fill_data.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "components/autofill/core/common/password_form_fill_data.h"
+
+#include <tuple>
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/common/form_field_data.h"
@@ -15,11 +17,8 @@
bool UsernamesCollectionKey::operator<(
const UsernamesCollectionKey& other) const {
- if (username != other.username)
- return username < other.username;
- if (password != other.password)
- return password < other.password;
- return realm < other.realm;
+ return std::tie(username, password, realm) <
+ std::tie(other.username, other.password, other.realm);
}
PasswordFormFillData::PasswordFormFillData()

Powered by Google App Engine
This is Rietveld 408576698