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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
430 } | 430 } |
431 | 431 |
432 // Site Connection | 432 // Site Connection |
433 // We consider anything less than 80 bits encryption to be weak encryption. | 433 // We consider anything less than 80 bits encryption to be weak encryption. |
434 // TODO(wtc): Bug 1198735: report mixed/unsafe content for unencrypted and | 434 // TODO(wtc): Bug 1198735: report mixed/unsafe content for unencrypted and |
435 // weakly encrypted connections. | 435 // weakly encrypted connections. |
436 site_connection_status_ = SITE_CONNECTION_STATUS_UNKNOWN; | 436 site_connection_status_ = SITE_CONNECTION_STATUS_UNKNOWN; |
437 | 437 |
438 if (!ssl.cert_id) { | 438 if (!ssl.cert_id) { |
439 // Not HTTPS. | 439 // Not HTTPS. |
440 DCHECK_EQ(ssl.security_style, content::SECURITY_STYLE_UNAUTHENTICATED); | |
markusheintz_
2014/02/24 14:20:36
This DCHECK can still verify a precondition that w
wtc
2014/02/24 22:56:05
I haven't read this code for a long time, so I hav
| |
441 if (ssl.security_style == content::SECURITY_STYLE_UNAUTHENTICATED) | 440 if (ssl.security_style == content::SECURITY_STYLE_UNAUTHENTICATED) |
442 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED; | 441 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED; |
443 else | 442 else |
444 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR; | 443 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR; |
445 | 444 |
446 site_connection_details_.assign(l10n_util::GetStringFUTF16( | 445 site_connection_details_.assign(l10n_util::GetStringFUTF16( |
447 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, | 446 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, |
448 subject_name)); | 447 subject_name)); |
449 } else if (ssl.security_bits < 0) { | 448 } else if (ssl.security_bits < 0) { |
450 // Security strength is unknown. Say nothing. | 449 // Security strength is unknown. Say nothing. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
680 if (visited_before_today) { | 679 if (visited_before_today) { |
681 first_visit_text = l10n_util::GetStringFUTF16( | 680 first_visit_text = l10n_util::GetStringFUTF16( |
682 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, | 681 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, |
683 base::TimeFormatShortDate(first_visit)); | 682 base::TimeFormatShortDate(first_visit)); |
684 } else { | 683 } else { |
685 first_visit_text = l10n_util::GetStringUTF16( | 684 first_visit_text = l10n_util::GetStringUTF16( |
686 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); | 685 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); |
687 } | 686 } |
688 ui_->SetFirstVisit(first_visit_text); | 687 ui_->SetFirstVisit(first_visit_text); |
689 } | 688 } |
OLD | NEW |