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

Unified Diff: components/password_manager/core/browser/psl_matching_helper.h

Issue 508143002: Remove Finch kill switch for PSL matching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed histogram constant from DISABLED to NOT_USED Created 6 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/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 7213e061dcd170871d80d921911210e149082c16..e4e6ac1745907956f79fc65961715e2fd9d683f6 100644
--- a/components/password_manager/core/browser/psl_matching_helper.h
+++ b/components/password_manager/core/browser/psl_matching_helper.h
@@ -17,63 +17,38 @@ struct PasswordForm;
namespace password_manager {
-class PSLMatchingHelper {
- public:
- // Enum used for histogram tracking PSL Domain triggering.
- // New entries should only be added to the end of the enum (before *_COUNT) so
- // as to not disrupt existing data.
- enum PSLDomainMatchMetric {
- PSL_DOMAIN_MATCH_DISABLED = 0,
- PSL_DOMAIN_MATCH_NONE,
- PSL_DOMAIN_MATCH_FOUND,
- PSL_DOMAIN_MATCH_COUNT
- };
-
- PSLMatchingHelper();
- ~PSLMatchingHelper();
-
- bool IsMatchingEnabled() const;
-
- // Using the public suffix list for matching the origin is only needed for
- // websites that do not have a single hostname for entering credentials. It
- // would be better for their users if they did, but until then we help them
- // find
- // credentials across different hostnames. We know that accounts.google.com is
- // the only hostname we should be accepting credentials on for any domain
- // under
- // google.com, so we can apply a tighter policy for that domain.
- // For owners of domains where a single hostname is always used when your
- // users are entering their credentials, please contact palmer@chromium.org,
- // nyquist@chromium.org or file a bug at http://crbug.com/ to be added here.
- bool ShouldPSLDomainMatchingApply(
- const std::string& registry_controlled_domain) const;
-
- // Two URLs are considered a Public Suffix Domain match if they have the same
- // scheme, ports, and their registry controlled domains are equal. If one or
- // both arguments do not describe valid URLs, returns false.
- static bool IsPublicSuffixDomainMatch(const std::string& url1,
- const std::string& url2);
-
- // Two hosts are considered to belong to the same website when they share the
- // registry-controlled domain part.
- static std::string GetRegistryControlledDomain(const GURL& signon_realm);
-
- // This overrides both the command line flags and platform restrictions. This
- // function is not thread safe, and should be called before any other methods
- // of |PSLMatchingHelper| are called.
- static void EnablePublicSuffixDomainMatchingForTesting();
-
- private:
- static bool DeterminePSLEnabled();
-
- const bool psl_enabled_;
-
- // Default is false, once set to true, overrides |psl_enabled_|.
- static bool psl_enabled_override_;
-
- DISALLOW_COPY_AND_ASSIGN(PSLMatchingHelper);
+// Enum used for histogram tracking PSL Domain triggering.
+// New entries should only be added to the end of the enum (before *_COUNT) so
+// as to not disrupt existing data.
+enum PSLDomainMatchMetric {
+ PSL_DOMAIN_MATCH_NOT_USED = 0,
+ PSL_DOMAIN_MATCH_NONE,
+ PSL_DOMAIN_MATCH_FOUND,
+ PSL_DOMAIN_MATCH_COUNT
};
+// Using the public suffix list for matching the origin is only needed for
+// websites that do not have a single hostname for entering credentials. It
+// would be better for their users if they did, but until then we help them find
+// credentials across different hostnames. We know that accounts.google.com is
+// the only hostname we should be accepting credentials on for any domain under
+// google.com, so we can apply a tighter policy for that domain. For owners of
+// domains where a single hostname is always used when your users are entering
+// their credentials, please contact palmer@chromium.org, nyquist@chromium.org
+// or file a bug at http://crbug.com/ to be added here.
+bool ShouldPSLDomainMatchingApply(
+ const std::string& registry_controlled_domain);
+
+// Two URLs are considered a Public Suffix Domain match if they have the same
+// scheme, ports, and their registry controlled domains are equal. If one or
+// both arguments do not describe valid URLs, returns false.
+bool IsPublicSuffixDomainMatch(const std::string& url1,
+ const std::string& url2);
+
+// Two hosts are considered to belong to the same website when they share the
+// registry-controlled domain part.
+std::string GetRegistryControlledDomain(const GURL& signon_realm);
+
} // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PSL_MATCHING_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698