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

Side by Side Diff: components/toolbar/toolbar_model_impl.cc

Issue 2422303002: Show HTTP-Bad security chip UI on Mac and Views (Closed)
Patch Set: Fix typo Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "components/toolbar/toolbar_model_impl.h" 5 #include "components/toolbar/toolbar_model_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 DCHECK(!cert->subject().organization_names.empty()); 126 DCHECK(!cert->subject().organization_names.empty());
127 DCHECK(!cert->subject().country_name.empty()); 127 DCHECK(!cert->subject().country_name.empty());
128 return l10n_util::GetStringFUTF16( 128 return l10n_util::GetStringFUTF16(
129 IDS_SECURE_CONNECTION_EV, 129 IDS_SECURE_CONNECTION_EV,
130 base::UTF8ToUTF16(cert->subject().organization_names[0]), 130 base::UTF8ToUTF16(cert->subject().organization_names[0]),
131 base::UTF8ToUTF16(cert->subject().country_name)); 131 base::UTF8ToUTF16(cert->subject().country_name));
132 } 132 }
133 133
134 base::string16 ToolbarModelImpl::GetSecureVerboseText() const { 134 base::string16 ToolbarModelImpl::GetSecureVerboseText() const {
135 switch (GetSecurityLevel(false)) { 135 switch (GetSecurityLevel(false)) {
136 case SecurityStateModel::HTTP_SHOW_WARNING:
137 return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE);
136 case SecurityStateModel::SECURE: 138 case SecurityStateModel::SECURE:
137 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); 139 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE);
138 case SecurityStateModel::DANGEROUS: 140 case SecurityStateModel::DANGEROUS:
139 return l10n_util::GetStringUTF16(delegate_->FailsMalwareCheck() 141 return l10n_util::GetStringUTF16(delegate_->FailsMalwareCheck()
140 ? IDS_DANGEROUS_VERBOSE_STATE 142 ? IDS_DANGEROUS_VERBOSE_STATE
141 : IDS_NOT_SECURE_VERBOSE_STATE); 143 : IDS_NOT_SECURE_VERBOSE_STATE);
142 default: 144 default:
143 return base::string16(); 145 return base::string16();
144 } 146 }
145 } 147 }
146 148
147 bool ToolbarModelImpl::ShouldDisplayURL() const { 149 bool ToolbarModelImpl::ShouldDisplayURL() const {
148 return delegate_->ShouldDisplayURL(); 150 return delegate_->ShouldDisplayURL();
149 } 151 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698