| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 403 |
| 404 #if defined(SAFE_BROWSING_DB_LOCAL) | 404 #if defined(SAFE_BROWSING_DB_LOCAL) |
| 405 safe_browsing::PasswordProtectionService* | 405 safe_browsing::PasswordProtectionService* |
| 406 ChromePasswordManagerClient::GetPasswordProtectionService() const { | 406 ChromePasswordManagerClient::GetPasswordProtectionService() const { |
| 407 if (g_browser_process && g_browser_process->safe_browsing_service()) { | 407 if (g_browser_process && g_browser_process->safe_browsing_service()) { |
| 408 return g_browser_process->safe_browsing_service() | 408 return g_browser_process->safe_browsing_service() |
| 409 ->GetPasswordProtectionService(profile_); | 409 ->GetPasswordProtectionService(profile_); |
| 410 } | 410 } |
| 411 return nullptr; | 411 return nullptr; |
| 412 } | 412 } |
| 413 |
| 414 void ChromePasswordManagerClient::CheckSafeBrowsingReputation( |
| 415 const GURL& form_action) { |
| 416 safe_browsing::PasswordProtectionService* pps = |
| 417 GetPasswordProtectionService(); |
| 418 if (pps) |
| 419 pps->MaybeStartLowReputationRequest(GetMainFrameURL(), form_action); |
| 420 } |
| 413 #endif | 421 #endif |
| 414 | 422 |
| 415 // TODO(crbug.com/706392): Fix password reuse detection for Android. | 423 // TODO(crbug.com/706392): Fix password reuse detection for Android. |
| 416 #if !defined(OS_ANDROID) | 424 #if !defined(OS_ANDROID) |
| 417 void ChromePasswordManagerClient::DidFinishNavigation( | 425 void ChromePasswordManagerClient::DidFinishNavigation( |
| 418 content::NavigationHandle* navigation_handle) { | 426 content::NavigationHandle* navigation_handle) { |
| 419 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) | 427 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) |
| 420 return; | 428 return; |
| 421 | 429 |
| 422 password_reuse_detection_manager_.DidNavigateMainFrame(GetMainFrameURL()); | 430 password_reuse_detection_manager_.DidNavigateMainFrame(GetMainFrameURL()); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // static | 698 // static |
| 691 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { | 699 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { |
| 692 std::string scheme = url.scheme(); | 700 std::string scheme = url.scheme(); |
| 693 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( | 701 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( |
| 694 scheme) && | 702 scheme) && |
| 695 #if BUILDFLAG(ENABLE_EXTENSIONS) | 703 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 696 scheme != extensions::kExtensionScheme && | 704 scheme != extensions::kExtensionScheme && |
| 697 #endif | 705 #endif |
| 698 scheme != content::kChromeDevToolsScheme); | 706 scheme != content::kChromeDevToolsScheme); |
| 699 } | 707 } |
| OLD | NEW |