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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2892093003: Don't trigger Phishguard pings if we cannot compute URL reputation. (Closed)
Patch Set: update comments Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // TODO(jialiul): Pass in web_content() instead of GetMainFrameURL(), such 421 pps->MaybeStartPasswordFieldOnFocusRequest(
422 // that web_content can be used to display safe browsing interstitial. 422 web_contents(), GetMainFrameURL(), form_action, frame_url);
423 pps->MaybeStartPasswordFieldOnFocusRequest(GetMainFrameURL(), form_action,
424 frame_url);
425 } 423 }
426 } 424 }
427 425
428 void ChromePasswordManagerClient::CheckProtectedPasswordEntry( 426 void ChromePasswordManagerClient::CheckProtectedPasswordEntry(
429 const std::string& password_saved_domain) { 427 const std::string& password_saved_domain) {
430 safe_browsing::PasswordProtectionService* pps = 428 safe_browsing::PasswordProtectionService* pps =
431 GetPasswordProtectionService(); 429 GetPasswordProtectionService();
432 if (pps) { 430 if (pps) {
433 // TODO(jialiul): Pass in web_content() instead of GetMainFrameURL(), such 431 pps->MaybeStartProtectedPasswordEntryRequest(
434 // that web_content can be used to display safe browsing interstitial. 432 web_contents(), GetMainFrameURL(), password_saved_domain);
435 pps->MaybeStartProtectedPasswordEntryRequest(GetMainFrameURL(),
436 password_saved_domain);
437 } 433 }
438 } 434 }
439 #endif 435 #endif
440 436
441 // TODO(crbug.com/706392): Fix password reuse detection for Android. 437 // TODO(crbug.com/706392): Fix password reuse detection for Android.
442 #if !defined(OS_ANDROID) 438 #if !defined(OS_ANDROID)
443 void ChromePasswordManagerClient::DidFinishNavigation( 439 void ChromePasswordManagerClient::DidFinishNavigation(
444 content::NavigationHandle* navigation_handle) { 440 content::NavigationHandle* navigation_handle) {
445 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) 441 if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
446 return; 442 return;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 // static 713 // static
718 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { 714 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) {
719 std::string scheme = url.scheme(); 715 std::string scheme = url.scheme();
720 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( 716 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
721 scheme) && 717 scheme) &&
722 #if BUILDFLAG(ENABLE_EXTENSIONS) 718 #if BUILDFLAG(ENABLE_EXTENSIONS)
723 scheme != extensions::kExtensionScheme && 719 scheme != extensions::kExtensionScheme &&
724 #endif 720 #endif
725 scheme != content::kChromeDevToolsScheme); 721 scheme != content::kChromeDevToolsScheme);
726 } 722 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698