Chromium Code Reviews| 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/ui/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 433 | 433 |
| 434 const base::string16 bullet = UTF8ToUTF16("\n • "); | 434 const base::string16 bullet = UTF8ToUTF16("\n • "); |
| 435 std::vector<SSLErrorInfo> errors; | 435 std::vector<SSLErrorInfo> errors; |
| 436 SSLErrorInfo::GetErrorsForCertStatus(ssl.cert_id, ssl.cert_status, | 436 SSLErrorInfo::GetErrorsForCertStatus(ssl.cert_id, ssl.cert_status, |
| 437 url, &errors); | 437 url, &errors); |
| 438 for (size_t i = 0; i < errors.size(); ++i) { | 438 for (size_t i = 0; i < errors.size(); ++i) { |
| 439 site_identity_details_ += bullet; | 439 site_identity_details_ += bullet; |
| 440 site_identity_details_ += errors[i].short_description(); | 440 site_identity_details_ += errors[i].short_description(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 if (ssl.cert_status & net::CERT_STATUS_DEPRECATED_SIGNATURE_ALGORITHM) { | |
| 444 site_identity_details_ += bullet; | |
| 445 site_identity_details_ += l10n_util::GetStringUTF16( | |
| 446 IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM); | |
| 447 } | |
| 448 | |
| 443 if (ssl.cert_status & net::CERT_STATUS_NON_UNIQUE_NAME) { | 449 if (ssl.cert_status & net::CERT_STATUS_NON_UNIQUE_NAME) { |
| 444 site_identity_details_ += ASCIIToUTF16("\n\n"); | 450 site_identity_details_ += ASCIIToUTF16("\n\n"); |
| 445 site_identity_details_ += l10n_util::GetStringUTF16( | 451 site_identity_details_ += l10n_util::GetStringUTF16( |
| 446 IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); | 452 IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); |
| 447 } | 453 } |
| 448 } | 454 } |
| 449 | 455 |
| 450 // Site Connection | 456 // Site Connection |
| 451 // We consider anything less than 80 bits encryption to be weak encryption. | 457 // We consider anything less than 80 bits encryption to be weak encryption. |
| 452 // TODO(wtc): Bug 1198735: report mixed/unsafe content for unencrypted and | 458 // TODO(wtc): Bug 1198735: report mixed/unsafe content for unencrypted and |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 487 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED; | 493 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED; |
| 488 site_connection_details_.assign(l10n_util::GetStringFUTF16( | 494 site_connection_details_.assign(l10n_util::GetStringFUTF16( |
| 489 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT, | 495 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT, |
| 490 subject_name, | 496 subject_name, |
| 491 base::IntToString16(ssl.security_bits))); | 497 base::IntToString16(ssl.security_bits))); |
| 492 if (ssl.content_status) { | 498 if (ssl.content_status) { |
| 493 bool ran_insecure_content = | 499 bool ran_insecure_content = |
| 494 !!(ssl.content_status & content::SSLStatus::RAN_INSECURE_CONTENT); | 500 !!(ssl.content_status & content::SSLStatus::RAN_INSECURE_CONTENT); |
| 495 site_connection_status_ = ran_insecure_content ? | 501 site_connection_status_ = ran_insecure_content ? |
| 496 SITE_CONNECTION_STATUS_ENCRYPTED_ERROR | 502 SITE_CONNECTION_STATUS_ENCRYPTED_ERROR |
| 497 : SITE_CONNECTION_STATUS_MIXED_CONTENT; | 503 : SITE_CONNECTION_STATUS_MIXED_CONTENT; |
|
Ryan Sleevi
2014/08/28 04:23:31
This is where we can control the icon used, if we
| |
| 498 site_connection_details_.assign(l10n_util::GetStringFUTF16( | 504 site_connection_details_.assign(l10n_util::GetStringFUTF16( |
| 499 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, | 505 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, |
| 500 site_connection_details_, | 506 site_connection_details_, |
| 501 l10n_util::GetStringUTF16(ran_insecure_content ? | 507 l10n_util::GetStringUTF16(ran_insecure_content ? |
| 502 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR : | 508 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR : |
| 503 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING))); | 509 IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING))); |
| 504 } | 510 } |
| 505 } | 511 } |
| 506 | 512 |
| 507 uint16 cipher_suite = | 513 uint16 cipher_suite = |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 715 if (visited_before_today) { | 721 if (visited_before_today) { |
| 716 first_visit_text = l10n_util::GetStringFUTF16( | 722 first_visit_text = l10n_util::GetStringFUTF16( |
| 717 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, | 723 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, |
| 718 base::TimeFormatShortDate(first_visit)); | 724 base::TimeFormatShortDate(first_visit)); |
| 719 } else { | 725 } else { |
| 720 first_visit_text = l10n_util::GetStringUTF16( | 726 first_visit_text = l10n_util::GetStringUTF16( |
| 721 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); | 727 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); |
| 722 } | 728 } |
| 723 ui_->SetFirstVisit(first_visit_text); | 729 ui_->SetFirstVisit(first_visit_text); |
| 724 } | 730 } |
| OLD | NEW |