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

Unified Diff: chrome/browser/ui/passwords/password_manager_presenter.cc

Issue 2439953004: Remove invalid "suffix" assumption from CreateSortKey (Closed)
Patch Set: Fix typo Created 4 years, 2 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/ui/passwords/password_manager_presenter.cc
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index 1e130bafb591dbf7c402d0d692f08e33d0fcce57..d383801718064e3b18e482abd0a1d819c699ab28 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -86,9 +86,7 @@ std::string CreateSortKey(const autofill::PasswordForm& form,
origin, net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
if (site_name.empty()) // e.g. localhost.
site_name = origin;
- std::string key =
- site_name + password_manager::SplitByDotAndReverse(StringPiece(
- &origin[0], origin.length() - site_name.length()));
+ std::string key = site_name + password_manager::SplitByDotAndReverse(origin);
if (entry_type == PasswordEntryType::SAVED) {
key = key + kSortKeyPartsSeparator +

Powered by Google App Engine
This is Rietveld 408576698