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 8f2edcd0c7b07c1d13c637eff1042f1a1c57b671..78ec34493e92a4f3a1aa602ef444e3513008e071 100644 |
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc |
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc |
@@ -87,8 +87,27 @@ ToolbarModel::SecurityLevel ToolbarModelImpl::GetSecurityLevelForWebContents( |
const SSLStatus& ssl = entry->GetSSL(); |
switch (ssl.security_style) { |
case content::SECURITY_STYLE_UNKNOWN: |
- case content::SECURITY_STYLE_UNAUTHENTICATED: |
return NONE; |
+ case content::SECURITY_STYLE_UNAUTHENTICATED: { |
+ base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
+ std::string choice = |
+ cmd->GetSwitchValueASCII(switches::kMarkHttpAsNonSecure); |
+ if (choice.empty()) { |
+ ToolbarModel::SecurityLevel security_level = NONE; |
+ if (GetSecurityLevelForFieldTrialGroup( |
jww
2014/12/20 01:21:57
According to Finch documentation, you should actua
Ryan Sleevi
2014/12/20 01:29:32
See https://goto.google.com/finch-and-flags
palmer
2014/12/20 01:59:53
OK, I think I did this right. I'm sure you'll let
|
+ base::FieldTrialList::FindFullName("MarkHTTPAsNonSecure"), |
+ &security_level)) { |
+ return security_level; |
+ } |
+ return NONE; |
+ } else if (choice == "dubious") { |
+ return ToolbarModel::SECURITY_WARNING; |
+ } else if (choice == "non-secure") { |
+ return ToolbarModel::SECURITY_ERROR; |
+ } else { |
+ return NONE; |
+ } |
+ } |
case content::SECURITY_STYLE_AUTHENTICATION_BROKEN: |
return SECURITY_ERROR; |