Chromium Code Reviews| 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 |