OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/page_info_model.h" | 5 #include "chrome/browser/page_info_model.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 134 } |
135 description.assign(l10n_util::GetStringFUTF16( | 135 description.assign(l10n_util::GetStringFUTF16( |
136 IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); | 136 IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); |
137 } | 137 } |
138 } else { | 138 } else { |
139 // HTTP or HTTPS with errors (not warnings). | 139 // HTTP or HTTPS with errors (not warnings). |
140 description.assign(l10n_util::GetStringUTF16( | 140 description.assign(l10n_util::GetStringUTF16( |
141 IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)); | 141 IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)); |
142 icon_id = ssl.security_style() == SECURITY_STYLE_UNAUTHENTICATED ? | 142 icon_id = ssl.security_style() == SECURITY_STYLE_UNAUTHENTICATED ? |
143 ICON_STATE_WARNING_MAJOR : ICON_STATE_ERROR; | 143 ICON_STATE_WARNING_MAJOR : ICON_STATE_ERROR; |
| 144 |
| 145 if (ssl.cert_status() & net::CERT_STATUS_NON_UNIQUE_NAME) { |
| 146 description += ASCIIToUTF16("\n\n"); |
| 147 description += l10n_util::GetStringUTF16( |
| 148 IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); |
| 149 } |
144 } | 150 } |
145 sections_.push_back(SectionInfo( | 151 sections_.push_back(SectionInfo( |
146 icon_id, | 152 icon_id, |
147 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_IDENTITY_TITLE), | 153 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_IDENTITY_TITLE), |
148 headline, | 154 headline, |
149 description, | 155 description, |
150 SECTION_INFO_IDENTITY)); | 156 SECTION_INFO_IDENTITY)); |
151 | 157 |
152 // Connection section. | 158 // Connection section. |
153 // We consider anything less than 80 bits encryption to be weak encryption. | 159 // We consider anything less than 80 bits encryption to be weak encryption. |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 gfx::NativeImage PageInfoModel::GetBitmapNamed(int resource_id) { | 369 gfx::NativeImage PageInfoModel::GetBitmapNamed(int resource_id) { |
364 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 370 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
365 gfx::NativeImage image = rb.GetNativeImageNamed(resource_id); | 371 gfx::NativeImage image = rb.GetNativeImageNamed(resource_id); |
366 #if defined(OS_MACOSX) | 372 #if defined(OS_MACOSX) |
367 // Unlike other platforms, the Mac ResourceBundle does not keep a shared image | 373 // Unlike other platforms, the Mac ResourceBundle does not keep a shared image |
368 // cache. These are released in the dtor. | 374 // cache. These are released in the dtor. |
369 mac_util::NSObjectRetain(image); | 375 mac_util::NSObjectRetain(image); |
370 #endif | 376 #endif |
371 return image; | 377 return image; |
372 } | 378 } |
OLD | NEW |