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

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

Issue 2331133002: [Material] Show "Dangerous" for Safe Browsing Security State (Closed)
Patch Set: Created 4 years, 3 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 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 IDS_SECURE_CONNECTION_EV, 127 IDS_SECURE_CONNECTION_EV,
128 base::UTF8ToUTF16(cert->subject().organization_names[0]), 128 base::UTF8ToUTF16(cert->subject().organization_names[0]),
129 base::UTF8ToUTF16(cert->subject().country_name)); 129 base::UTF8ToUTF16(cert->subject().country_name));
130 } 130 }
131 131
132 base::string16 ToolbarModelImpl::GetSecureVerboseText() const { 132 base::string16 ToolbarModelImpl::GetSecureVerboseText() const {
133 switch (GetSecurityLevel(false)) { 133 switch (GetSecurityLevel(false)) {
134 case SecurityStateModel::SECURE: 134 case SecurityStateModel::SECURE:
135 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); 135 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE);
136 case SecurityStateModel::SECURITY_ERROR: 136 case SecurityStateModel::SECURITY_ERROR:
137 return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE); 137 return delegate_->GetFailsMalwareCheck()
138 ? l10n_util::GetStringUTF16(IDS_DANGEROUS_VERBOSE_STATE)
139 : l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE);
Peter Kasting 2016/09/13 05:55:59 Nit: Move ?: inside call to GetStringUTF16()
spqchan 2016/09/13 21:23:41 Done.
138 default: 140 default:
139 return base::string16(); 141 return base::string16();
140 } 142 }
141 } 143 }
142 144
143 bool ToolbarModelImpl::ShouldDisplayURL() const { 145 bool ToolbarModelImpl::ShouldDisplayURL() const {
144 return delegate_->ShouldDisplayURL(); 146 return delegate_->ShouldDisplayURL();
145 } 147 }
OLDNEW
« components/toolbar/toolbar_model_delegate.h ('K') | « components/toolbar/toolbar_model_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698