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

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

Issue 2331133002: [Material] Show "Dangerous" for Safe Browsing Security State (Closed)
Patch Set: 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
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..8403ed495cffdf7ad967c959dd31792e8f0e0a46 100644
--- a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
+++ b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
@@ -91,6 +91,17 @@ scoped_refptr<net::X509Certificate> ChromeToolbarModelDelegate::GetCertificate()
return cert;
}
+bool ChromeToolbarModelDelegate::GetFailsMalwareCheck() const {
+ content::WebContents* web_contents = GetActiveWebContents();
+ // If there is no active WebContents (which can happen during toolbar
+ // initialization), assume it did not failed.
Peter Kasting 2016/09/13 05:55:59 Nit: If there's no WebContents, there's no current
spqchan 2016/09/13 21:23:41 Done.
+ if (!web_contents)
+ return false;
+
+ auto* client = ChromeSecurityStateModelClient::FromWebContents(web_contents);
+ return client->GetSecurityInfo().fails_malware_check;
+}
+
content::NavigationController*
ChromeToolbarModelDelegate::GetNavigationController() const {
// This |current_tab| can be null during the initialization of the toolbar

Powered by Google App Engine
This is Rietveld 408576698