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

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

Issue 2447143002: Stop prerendering of a site if it uses the Credential Manager API. (Closed)
Patch Set: rebase 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: 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 3c48cebf88867baf23191b50fd27eba45baf8cba..bc77752551a67c1eb897fad6cff220a69d1bf794 100644
--- a/components/password_manager/core/browser/password_manager_client.h
+++ b/components/password_manager/core/browser/password_manager_client.h
@@ -64,6 +64,14 @@ class PasswordManagerClient {
// password manager is disabled, or in the presence of SSL errors on a page.
virtual bool IsFillingEnabledForCurrentPage() 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
+ // destroyed in this case.
+ // Even if the method returns true the API may still be disabled or limited
+ // depending on the method called because IsFillingEnabledForCurrentPage() and
+ // IsSavingAndFillingEnabledForCurrentPage are respected.
+ virtual bool OnCredentialManagerUsed();
+
// Informs the embedder of a password form that can be saved or updated in
// password store if the user allows it. The embedder is not required to
// prompt the user if it decides that this form doesn't need to be saved or

Powered by Google App Engine
This is Rietveld 408576698