| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 const GURL& frame_url) { | 417 const GURL& frame_url) { |
| 418 safe_browsing::PasswordProtectionService* pps = | 418 safe_browsing::PasswordProtectionService* pps = |
| 419 GetPasswordProtectionService(); | 419 GetPasswordProtectionService(); |
| 420 if (pps) { | 420 if (pps) { |
| 421 pps->MaybeStartPasswordFieldOnFocusRequest( | 421 pps->MaybeStartPasswordFieldOnFocusRequest( |
| 422 web_contents(), GetMainFrameURL(), form_action, frame_url); | 422 web_contents(), GetMainFrameURL(), form_action, frame_url); |
| 423 } | 423 } |
| 424 } | 424 } |
| 425 | 425 |
| 426 void ChromePasswordManagerClient::CheckProtectedPasswordEntry( | 426 void ChromePasswordManagerClient::CheckProtectedPasswordEntry( |
| 427 const std::string& password_saved_domain) { | 427 const std::string& password_saved_domain, |
| 428 bool password_field_exists) { |
| 428 safe_browsing::PasswordProtectionService* pps = | 429 safe_browsing::PasswordProtectionService* pps = |
| 429 GetPasswordProtectionService(); | 430 GetPasswordProtectionService(); |
| 430 if (pps) { | 431 if (pps) { |
| 431 pps->MaybeStartProtectedPasswordEntryRequest( | 432 pps->MaybeStartProtectedPasswordEntryRequest( |
| 432 web_contents(), GetMainFrameURL(), password_saved_domain); | 433 web_contents(), GetMainFrameURL(), password_saved_domain, |
| 434 password_field_exists); |
| 433 } | 435 } |
| 434 } | 436 } |
| 435 #endif | 437 #endif |
| 436 | 438 |
| 437 // TODO(crbug.com/706392): Fix password reuse detection for Android. | 439 // TODO(crbug.com/706392): Fix password reuse detection for Android. |
| 438 #if !defined(OS_ANDROID) | 440 #if !defined(OS_ANDROID) |
| 439 void ChromePasswordManagerClient::DidFinishNavigation( | 441 void ChromePasswordManagerClient::DidFinishNavigation( |
| 440 content::NavigationHandle* navigation_handle) { | 442 content::NavigationHandle* navigation_handle) { |
| 441 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) | 443 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) |
| 442 return; | 444 return; |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 // static | 715 // static |
| 714 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { | 716 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { |
| 715 std::string scheme = url.scheme(); | 717 std::string scheme = url.scheme(); |
| 716 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( | 718 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( |
| 717 scheme) && | 719 scheme) && |
| 718 #if BUILDFLAG(ENABLE_EXTENSIONS) | 720 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 719 scheme != extensions::kExtensionScheme && | 721 scheme != extensions::kExtensionScheme && |
| 720 #endif | 722 #endif |
| 721 scheme != content::kChromeDevToolsScheme); | 723 scheme != content::kChromeDevToolsScheme); |
| 722 } | 724 } |
| OLD | NEW |