OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "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 "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 (ssl.connection_status & | 234 (ssl.connection_status & |
235 net::SSL_CONNECTION_NO_RENEGOTIATION_EXTENSION) != 0; | 235 net::SSL_CONNECTION_NO_RENEGOTIATION_EXTENSION) != 0; |
236 const char *key_exchange, *cipher, *mac; | 236 const char *key_exchange, *cipher, *mac; |
237 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, cipher_suite); | 237 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, cipher_suite); |
238 | 238 |
239 description += ASCIIToUTF16("\n\n"); | 239 description += ASCIIToUTF16("\n\n"); |
240 description += l10n_util::GetStringFUTF16( | 240 description += l10n_util::GetStringFUTF16( |
241 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS, | 241 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS, |
242 ASCIIToUTF16(cipher), ASCIIToUTF16(mac), ASCIIToUTF16(key_exchange)); | 242 ASCIIToUTF16(cipher), ASCIIToUTF16(mac), ASCIIToUTF16(key_exchange)); |
243 | 243 |
244 description += ASCIIToUTF16("\n\n"); | |
245 uint8 compression_id = | 244 uint8 compression_id = |
246 net::SSLConnectionStatusToCompression(ssl.connection_status); | 245 net::SSLConnectionStatusToCompression(ssl.connection_status); |
247 if (compression_id) { | 246 if (compression_id) { |
248 const char* compression; | 247 const char* compression; |
249 net::SSLCompressionToString(&compression, compression_id); | 248 net::SSLCompressionToString(&compression, compression_id); |
249 description += ASCIIToUTF16("\n\n"); | |
250 description += l10n_util::GetStringFUTF16( | 250 description += l10n_util::GetStringFUTF16( |
251 IDS_PAGE_INFO_SECURITY_TAB_COMPRESSION_DETAILS, | 251 IDS_PAGE_INFO_SECURITY_TAB_COMPRESSION_DETAILS, |
252 ASCIIToUTF16(compression)); | 252 ASCIIToUTF16(compression)); |
253 } else { | |
254 description += l10n_util::GetStringUTF16( | |
255 IDS_PAGE_INFO_SECURITY_TAB_NO_COMPRESSION); | |
wtc
2012/08/01 17:31:28
Just to doublecheck: if TLS compression is not use
agl
2012/08/01 23:04:59
Yes. It seems silly to mention that the connection
| |
256 } | 253 } |
257 | 254 |
258 if (did_fallback) { | 255 if (did_fallback) { |
259 // For now, only SSL/TLS version fallback will trigger a warning icon. | 256 // For now, only SSL/TLS version fallback will trigger a warning icon. |
260 if (icon_id < ICON_STATE_WARNING_MINOR) | 257 if (icon_id < ICON_STATE_WARNING_MINOR) |
261 icon_id = ICON_STATE_WARNING_MINOR; | 258 icon_id = ICON_STATE_WARNING_MINOR; |
262 description += ASCIIToUTF16("\n\n"); | 259 description += ASCIIToUTF16("\n\n"); |
263 description += l10n_util::GetStringUTF16( | 260 description += l10n_util::GetStringUTF16( |
264 IDS_PAGE_INFO_SECURITY_TAB_FALLBACK_MESSAGE); | 261 IDS_PAGE_INFO_SECURITY_TAB_FALLBACK_MESSAGE); |
265 } | 262 } |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 // Loads the icons into the vector. The order must match the SectionStateIcon | 359 // Loads the icons into the vector. The order must match the SectionStateIcon |
363 // enum. | 360 // enum. |
364 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 361 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
365 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_GOOD)); | 362 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_GOOD)); |
366 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MINOR)); | 363 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MINOR)); |
367 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MAJOR)); | 364 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_WARNING_MAJOR)); |
368 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_BAD)); | 365 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_BAD)); |
369 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_INFO)); | 366 icons_.push_back(&rb.GetNativeImageNamed(IDR_PAGEINFO_INFO)); |
370 icons_.push_back(&rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_26)); | 367 icons_.push_back(&rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_26)); |
371 } | 368 } |
OLD | NEW |