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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 172173004: Remove unneeded DCHECK for connection status. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comment Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); 428 IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME);
429 } 429 }
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.security_style == content::SECURITY_STYLE_UNAUTHENTICATED) {
wtc 2014/02/27 22:30:29 As a workaround for the inability to disable the p
439 // Not HTTPS. 439 // HTTPS without a certificate, or not HTTPS.
440 DCHECK_EQ(ssl.security_style, content::SECURITY_STYLE_UNAUTHENTICATED); 440 DCHECK(!ssl.cert_id);
wtc 2014/02/25 22:55:27 Babu: I just looked at bug 344891 that you filed.
441 if (ssl.security_style == content::SECURITY_STYLE_UNAUTHENTICATED) 441 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED;
442 site_connection_status_ = SITE_CONNECTION_STATUS_UNENCRYPTED;
443 else
444 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR;
445 442
446 site_connection_details_.assign(l10n_util::GetStringFUTF16( 443 site_connection_details_.assign(l10n_util::GetStringFUTF16(
447 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, 444 IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT,
448 subject_name)); 445 subject_name));
449 } else if (ssl.security_bits < 0) { 446 } else if (ssl.security_bits < 0) {
450 // Security strength is unknown. Say nothing. 447 // Security strength is unknown. Say nothing.
451 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR; 448 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR;
452 } else if (ssl.security_bits == 0) { 449 } else if (ssl.security_bits == 0) {
453 DCHECK_NE(ssl.security_style, content::SECURITY_STYLE_UNAUTHENTICATED); 450 DCHECK_NE(ssl.security_style, content::SECURITY_STYLE_UNAUTHENTICATED);
454 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR; 451 site_connection_status_ = SITE_CONNECTION_STATUS_ENCRYPTED_ERROR;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 if (visited_before_today) { 677 if (visited_before_today) {
681 first_visit_text = l10n_util::GetStringFUTF16( 678 first_visit_text = l10n_util::GetStringFUTF16(
682 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, 679 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY,
683 base::TimeFormatShortDate(first_visit)); 680 base::TimeFormatShortDate(first_visit));
684 } else { 681 } else {
685 first_visit_text = l10n_util::GetStringUTF16( 682 first_visit_text = l10n_util::GetStringUTF16(
686 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); 683 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY);
687 } 684 }
688 ui_->SetFirstVisit(first_visit_text); 685 ui_->SetFirstVisit(first_visit_text);
689 } 686 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698