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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 } | 411 } |
412 return nullptr; | 412 return nullptr; |
413 } | 413 } |
414 | 414 |
415 void ChromePasswordManagerClient::CheckSafeBrowsingReputation( | 415 void ChromePasswordManagerClient::CheckSafeBrowsingReputation( |
416 const GURL& form_action, | 416 const GURL& form_action, |
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->MaybeStartLowReputationRequest(GetMainFrameURL(), form_action, | 421 pps->MaybeStartPasswordFieldOnFocusRequest(GetMainFrameURL(), form_action, |
422 frame_url); | 422 frame_url); |
423 } | 423 } |
424 } | 424 } |
425 #endif | 425 #endif |
426 | 426 |
427 // TODO(crbug.com/706392): Fix password reuse detection for Android. | 427 // TODO(crbug.com/706392): Fix password reuse detection for Android. |
428 #if !defined(OS_ANDROID) | 428 #if !defined(OS_ANDROID) |
429 void ChromePasswordManagerClient::DidFinishNavigation( | 429 void ChromePasswordManagerClient::DidFinishNavigation( |
430 content::NavigationHandle* navigation_handle) { | 430 content::NavigationHandle* navigation_handle) { |
431 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) | 431 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) |
432 return; | 432 return; |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 // static | 703 // static |
704 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { | 704 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { |
705 std::string scheme = url.scheme(); | 705 std::string scheme = url.scheme(); |
706 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( | 706 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( |
707 scheme) && | 707 scheme) && |
708 #if BUILDFLAG(ENABLE_EXTENSIONS) | 708 #if BUILDFLAG(ENABLE_EXTENSIONS) |
709 scheme != extensions::kExtensionScheme && | 709 scheme != extensions::kExtensionScheme && |
710 #endif | 710 #endif |
711 scheme != content::kChromeDevToolsScheme); | 711 scheme != content::kChromeDevToolsScheme); |
712 } | 712 } |
OLD | NEW |