Chromium Code Reviews| Index: components/password_manager/core/browser/psl_matching_helper.h |
| diff --git a/components/password_manager/core/browser/psl_matching_helper.h b/components/password_manager/core/browser/psl_matching_helper.h |
| index d5839c54205fc08946a9a4eb9594327b3ce0cbea..7bfea29daa9ed4515f88adcb8dd1d9b3a1a8cf25 100644 |
| --- a/components/password_manager/core/browser/psl_matching_helper.h |
| +++ b/components/password_manager/core/browser/psl_matching_helper.h |
| @@ -33,9 +33,21 @@ enum class MatchResult { |
| FEDERATED_PSL_MATCH, |
| }; |
| -// For testing. |
| +#if defined(UNIT_TEST) |
|
vabr (Chromium)
2017/04/13 18:12:09
nit: Do you think we should warn in the comment th
vasilii
2017/04/13 18:16:59
Hmm, but an editor of the cc file should notice th
|
| std::ostream& operator<<(std::ostream& out, MatchResult result); |
| +// Returns true iff |form_signon_realm| designates a federated credential for |
| +// |origin|. It doesn't check the port because |form_signon_realm| doesn't have |
| +// it. |
| +bool IsFederatedRealm(const std::string& form_signon_realm, const GURL& origin); |
| + |
| +// Returns true iff |form_signon_realm| and |form_origin| designate a federated |
| +// PSL matching credential for the |origin|. |
| +bool IsFederatedPSLMatch(const std::string& form_signon_realm, |
| + const GURL& form_origin, |
| + const GURL& origin); |
| +#endif |
| + |
| // Returns what type of match applies to |form| and |form_digest|. |
| MatchResult GetMatchResult(const autofill::PasswordForm& form, |
| const PasswordStore::FormDigest& form_digest); |
| @@ -62,13 +74,6 @@ bool IsPublicSuffixDomainMatch(const std::string& url1, |
| // registry-controlled domain part. |
| std::string GetRegistryControlledDomain(const GURL& signon_realm); |
| -// Returns true iff |signon_realm| designates a federated credential for the |
| -// |origin|. |
| -bool IsFederatedMatch(const std::string& signon_realm, const GURL& origin); |
| - |
| -// Returns true iff |signon_realm| designates a federated PSL matching |
| -// credential for the |origin|. |
| -bool IsFederatedPSLMatch(const std::string& signon_realm, const GURL& origin); |
| } // namespace password_manager |
| #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PSL_MATCHING_HELPER_H_ |