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

Unified Diff: chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc

Issue 2331133002: [Material] Show "Dangerous" for Safe Browsing Security State (Closed)
Patch Set: Fix for pkasting Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h ('k') | components/omnibox_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
diff --git a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
index dc2889dcea1bd15cd3ecfe3d8f76171085331487..92437358525e25f342637c8783bd1ccda98bd057 100644
--- a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
+++ b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
@@ -91,6 +91,16 @@ scoped_refptr<net::X509Certificate> ChromeToolbarModelDelegate::GetCertificate()
return cert;
}
+bool ChromeToolbarModelDelegate::FailsMalwareCheck() const {
+ content::WebContents* web_contents = GetActiveWebContents();
+ // If there is no active WebContents (which can happen during toolbar
+ // initialization), so nothing can fail.
+ return web_contents &&
+ ChromeSecurityStateModelClient::FromWebContents(web_contents)
+ ->GetSecurityInfo()
+ .fails_malware_check;
+}
+
content::NavigationController*
ChromeToolbarModelDelegate::GetNavigationController() const {
// This |current_tab| can be null during the initialization of the toolbar
« no previous file with comments | « chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h ('k') | components/omnibox_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698