Index: chrome/browser/password_manager/chrome_password_manager_client.h |
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.h b/chrome/browser/password_manager/chrome_password_manager_client.h |
index 203aa420236567ee9de27022a887f25fb8bbf99a..f9674cd524d67e694215e79946e17a92f9a26dfb 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client.h |
+++ b/chrome/browser/password_manager/chrome_password_manager_client.h |
@@ -40,6 +40,8 @@ class ChromePasswordManagerClient |
// PasswordManagerClient implementation. |
virtual bool IsAutomaticPasswordSavingEnabled() const OVERRIDE; |
virtual bool IsPasswordManagerEnabledForCurrentPage() const OVERRIDE; |
+ virtual bool ShouldFilterAutofillResult( |
+ const autofill::PasswordForm& form) const OVERRIDE; |
virtual bool IsSyncAccountCredential( |
const std::string& username, const std::string& origin) const OVERRIDE; |
virtual void PromptUserToSavePassword( |
@@ -90,9 +92,18 @@ class ChromePasswordManagerClient |
// Returns true if the password manager should be enabled during sync signin. |
static bool EnabledForSyncSignin(); |
- private: |
+ protected: |
+ // Callable for tests. |
ChromePasswordManagerClient(content::WebContents* web_contents, |
autofill::AutofillClient* autofill_client); |
+ |
+ private: |
+ enum AutofillForSyncCredentialsState { |
+ ALLOW_SYNC_CREDENTIALS, |
+ DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH, |
+ DISALLOW_SYNC_CREDENTIALS, |
+ }; |
+ |
friend class content::WebContentsUserData<ChromePasswordManagerClient>; |
// content::WebContentsObserver overrides. |
@@ -122,6 +133,13 @@ class ChromePasswordManagerClient |
// |can_use_log_router_|. |
void NotifyRendererOfLoggingAvailability(); |
+ // Returns true if the last loaded page was for transactional re-auth on a |
+ // Google property. |
+ bool LastLoadWasTransactionalReauthPage() const; |
+ |
+ // Sets |autofill_state_| based on experiment and flag values. |
+ void SetUpAutofillSyncState(); |
+ |
Profile* const profile_; |
password_manager::ContentPasswordManagerDriver driver_; |
@@ -139,6 +157,9 @@ class ChromePasswordManagerClient |
// True if |this| is registered with some LogRouter which can accept logs. |
bool can_use_log_router_; |
+ // How to handle the sync credential in ShouldFilterAutofillResult(). |
+ AutofillForSyncCredentialsState autofill_sync_state_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
}; |