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

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

Issue 13483010: Add UI notifications for admin-provided SSL certificates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: automatically go to connection tab in status dropdown Created 7 years, 8 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/toolbar_model_impl.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index 4e63e235f8b0f0ee97b403c18fcbcb9d8d11e715..246dc9f5131fd5a66cb9c4452353a0554c249535 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -35,6 +35,10 @@
#include "net/cert/x509_certificate.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/policy/browser_policy_connector.h"
+#endif
+
using content::NavigationController;
using content::NavigationEntry;
using content::SSLStatus;
@@ -67,6 +71,12 @@ ToolbarModel::SecurityLevel ToolbarModelImpl::GetSecurityLevelForWebContents(
return SECURITY_ERROR;
case content::SECURITY_STYLE_AUTHENTICATED:
+#if defined(OS_CHROMEOS)
+ if (policy::BrowserPolicyConnector::UsedPolicyCertificates(
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()))) {
+ return SECURITY_POLICY_WARNING;
+ }
+#endif
if (!!(ssl.content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT))
return SECURITY_WARNING;
if (net::IsCertStatusError(ssl.cert_status)) {
@@ -194,6 +204,7 @@ int ToolbarModelImpl::GetIcon() const {
IDR_OMNIBOX_HTTPS_VALID,
IDR_OMNIBOX_HTTPS_VALID,
IDR_OMNIBOX_HTTPS_WARNING,
+ IDR_OMNIBOX_HTTPS_POLICY_WARNING,
IDR_OMNIBOX_HTTPS_INVALID,
};
DCHECK(arraysize(icon_ids) == NUM_SECURITY_LEVELS);

Powered by Google App Engine
This is Rietveld 408576698