| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 std::unique_ptr<password_manager::PasswordFormManager> form_to_save, | 216 std::unique_ptr<password_manager::PasswordFormManager> form_to_save, |
| 217 password_manager::CredentialSourceType type, | 217 password_manager::CredentialSourceType type, |
| 218 bool update_password) { | 218 bool update_password) { |
| 219 // Save password infobar and the password bubble prompts in case of | 219 // Save password infobar and the password bubble prompts in case of |
| 220 // "webby" URLs and do not prompt in case of "non-webby" URLS (e.g. file://). | 220 // "webby" URLs and do not prompt in case of "non-webby" URLS (e.g. file://). |
| 221 if (!BrowsingDataHelper::IsWebScheme( | 221 if (!BrowsingDataHelper::IsWebScheme( |
| 222 web_contents()->GetLastCommittedURL().scheme())) { | 222 web_contents()->GetLastCommittedURL().scheme())) { |
| 223 return false; | 223 return false; |
| 224 } | 224 } |
| 225 | 225 |
| 226 // Prevent the autofill password manager from prompting the second time. |
| 227 if (type == password_manager::CredentialSourceType::CREDENTIAL_SOURCE_API) |
| 228 password_manager_.DropFormManagers(); |
| 229 |
| 226 if (IsTheHotNewBubbleUIEnabled()) { | 230 if (IsTheHotNewBubbleUIEnabled()) { |
| 227 #if !BUILDFLAG(ANDROID_JAVA_UI) | 231 #if !BUILDFLAG(ANDROID_JAVA_UI) |
| 228 PasswordsClientUIDelegate* manage_passwords_ui_controller = | 232 PasswordsClientUIDelegate* manage_passwords_ui_controller = |
| 229 PasswordsClientUIDelegateFromWebContents(web_contents()); | 233 PasswordsClientUIDelegateFromWebContents(web_contents()); |
| 230 if (update_password && IsUpdatePasswordUIEnabled()) { | 234 if (update_password && IsUpdatePasswordUIEnabled()) { |
| 231 manage_passwords_ui_controller->OnUpdatePasswordSubmitted( | 235 manage_passwords_ui_controller->OnUpdatePasswordSubmitted( |
| 232 std::move(form_to_save)); | 236 std::move(form_to_save)); |
| 233 } else { | 237 } else { |
| 234 manage_passwords_ui_controller->OnPasswordSubmitted( | 238 manage_passwords_ui_controller->OnPasswordSubmitted( |
| 235 std::move(form_to_save)); | 239 std::move(form_to_save)); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 608 |
| 605 const password_manager::CredentialsFilter* | 609 const password_manager::CredentialsFilter* |
| 606 ChromePasswordManagerClient::GetStoreResultFilter() const { | 610 ChromePasswordManagerClient::GetStoreResultFilter() const { |
| 607 return &credentials_filter_; | 611 return &credentials_filter_; |
| 608 } | 612 } |
| 609 | 613 |
| 610 const password_manager::LogManager* ChromePasswordManagerClient::GetLogManager() | 614 const password_manager::LogManager* ChromePasswordManagerClient::GetLogManager() |
| 611 const { | 615 const { |
| 612 return log_manager_.get(); | 616 return log_manager_.get(); |
| 613 } | 617 } |
| OLD | NEW |