| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/android/toolbar/toolbar_model_android.h" | 5 #include "chrome/browser/ui/android/toolbar/toolbar_model_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/search/search.h" | 10 #include "chrome/browser/search/search.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return false; | 110 return false; |
| 111 | 111 |
| 112 const content::SSLStatus& ssl = entry->GetSSL(); | 112 const content::SSLStatus& ssl = entry->GetSSL(); |
| 113 if (ssl.security_style == content::SECURITY_STYLE_AUTHENTICATED) { | 113 if (ssl.security_style == content::SECURITY_STYLE_AUTHENTICATED) { |
| 114 scoped_refptr<net::X509Certificate> cert; | 114 scoped_refptr<net::X509Certificate> cert; |
| 115 // NOTE: This constant needs to be kept in sync with | 115 // NOTE: This constant needs to be kept in sync with |
| 116 // ToolbarModelImpl::GetSecurityLevelForWebContents(). | 116 // ToolbarModelImpl::GetSecurityLevelForWebContents(). |
| 117 static const int64_t kJanuary2016 = INT64_C(13096080000000000); | 117 static const int64_t kJanuary2016 = INT64_C(13096080000000000); |
| 118 if (content::CertStore::GetInstance()->RetrieveCert(ssl.cert_id, &cert) && | 118 if (content::CertStore::GetInstance()->RetrieveCert(ssl.cert_id, &cert) && |
| 119 (ssl.cert_status & net::CERT_STATUS_SHA1_SIGNATURE_PRESENT) && | 119 (ssl.cert_status & net::CERT_STATUS_SHA1_SIGNATURE_PRESENT) && |
| 120 cert->valid_expiry() > base::Time::FromInternalValue(kJanuary2016) && | 120 cert->valid_expiry() > base::Time::FromInternalValue(kJanuary2016)) { |
| 121 // NOTE: This use of SHA1IdentityUIWarning needs to be kept in sync | |
| 122 // with WebsiteSettings::Init(). | |
| 123 base::FieldTrialList::FindFullName("SHA1IdentityUIWarning") == | |
| 124 "Enabled") { | |
| 125 return true; | 121 return true; |
| 126 } | 122 } |
| 127 } | 123 } |
| 128 return false; | 124 return false; |
| 129 } | 125 } |
| OLD | NEW |