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

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

Issue 2721663002: Move Credentials when migrating to HSTS page (Closed)
Patch Set: More Explanation Created 3 years, 9 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/password_manager_client.h
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h
index f520d367064f59ebf51bdb8fdc2f150cd5de73a1..8edd18b07693af37246a5396a2b25f5f1921403c 100644
--- a/components/password_manager/core/browser/password_manager_client.h
+++ b/components/password_manager/core/browser/password_manager_client.h
@@ -38,6 +38,7 @@ enum PasswordSyncState {
// environment.
class PasswordManagerClient {
public:
+ using HSTSCallback = base::Callback<void(bool)>;
using CredentialsCallback =
base::Callback<void(const autofill::PasswordForm*)>;
@@ -53,9 +54,11 @@ class PasswordManagerClient {
// password manager is disabled, or in the presence of SSL errors on a page.
virtual bool IsFillingEnabledForCurrentPage() const;
- // Checks whether HTTP Strict Transport Security (HSTS) is active for the host
- // of the given origin.
- virtual bool IsHSTSActiveForHost(const GURL& origin) const;
+ // Checks asynchronously whether HTTP Strict Transport Security (HSTS) is
+ // active for the host of the given origin. Notifies |callback| with the
+ // result on the calling thread.
+ virtual void PostHSTSQueryForHost(const GURL& origin,
+ const HSTSCallback& callback) const;
// Checks if the Credential Manager API is allowed to run on the page. It's
// not allowed while prerendering and the pre-rendered WebContents will be

Powered by Google App Engine
This is Rietveld 408576698