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

Unified Diff: components/password_manager/core/browser/password_manager.cc

Issue 1031153002: [Credential Management] Smart lock save Credentials bubble should not always pop up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index 38f2df9b836421b535ad10682ad32cded7f998d6..ab94b61c241b9c14d7843e9e5ab824a5a3ffe755 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -179,24 +179,9 @@ void PasswordManager::SetFormHasGeneratedPassword(
// TODO(gcasto): Add UMA stats to track this.
}
-bool PasswordManager::IsEnabledForCurrentPage() const {
- bool ssl_errors = client_->DidLastPageLoadEncounterSSLErrors();
- bool client_check = client_->IsPasswordManagerEnabledForCurrentPage();
-
- scoped_ptr<BrowserSavePasswordProgressLogger> logger;
- if (client_->IsLoggingActive()) {
- logger.reset(new BrowserSavePasswordProgressLogger(client_));
- logger->LogMessage(Logger::STRING_ENABLED_FOR_CURRENT_PAGE_METHOD);
- logger->LogBoolean(Logger::STRING_SSL_ERRORS_PRESENT, ssl_errors);
- logger->LogBoolean(Logger::STRING_CLIENT_CHECK_PRESENT, client_check);
- }
-
- return !ssl_errors && client_check;
-}
-
bool PasswordManager::IsSavingEnabledForCurrentPage() const {
return *saving_passwords_enabled_ && !client_->IsOffTheRecord() &&
- IsEnabledForCurrentPage();
+ client_->IsEnabledForCurrentPage();
}
void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
@@ -444,7 +429,7 @@ void PasswordManager::CreatePendingLoginManagers(
logger->LogMessage(Logger::STRING_CREATE_LOGIN_MANAGERS_METHOD);
}
- if (!IsEnabledForCurrentPage())
+ if (!client_->IsEnabledForCurrentPage())
return;
if (logger) {

Powered by Google App Engine
This is Rietveld 408576698