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

Side by Side Diff: chrome/browser/ui/android/toolbar/toolbar_model_android.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698