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

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

Issue 2478573004: Convert GURL::{host,path} to GURL::{host_piece,path_piece} for ==. (Closed)
Patch Set: rebase to #431874 Created 4 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
« no previous file with comments | « components/omnibox/browser/omnibox_edit_model.cc ('k') | components/search_engines/template_url_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 78f3ba06941f34175e0fb5d02225a96a9ab5ec44..7ae0096a48124c08fdf07d016fd1be684170af68 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -236,10 +236,10 @@ PasswordFormManager::MatchResultMask PasswordFormManager::DoesManage(
// redirects to HTTPS (as in http://example.org -> https://example.org/auth).
if (!origins_match && !observed_form_.origin.SchemeIsCryptographic() &&
form.origin.SchemeIsCryptographic()) {
- const std::string& old_path = observed_form_.origin.path();
- const std::string& new_path = form.origin.path();
+ const base::StringPiece& old_path = observed_form_.origin.path_piece();
+ const base::StringPiece& new_path = form.origin.path_piece();
origins_match =
- observed_form_.origin.host() == form.origin.host() &&
+ observed_form_.origin.host_piece() == form.origin.host_piece() &&
observed_form_.origin.port() == form.origin.port() &&
base::StartsWith(new_path, old_path, base::CompareCase::SENSITIVE);
}
@@ -1162,7 +1162,8 @@ bool PasswordFormManager::IsBlacklistMatch(
}
if (observed_form_.scheme == PasswordForm::SCHEME_HTML) {
- return (blacklisted_form.origin.path() == observed_form_.origin.path()) ||
+ return (blacklisted_form.origin.path_piece() ==
+ observed_form_.origin.path_piece()) ||
(AreStringsEqualOrEmpty(blacklisted_form.submit_element,
observed_form_.submit_element) &&
AreStringsEqualOrEmpty(blacklisted_form.password_element,
« no previous file with comments | « components/omnibox/browser/omnibox_edit_model.cc ('k') | components/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698