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

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

Issue 10829452: Auto select the connection tab of the Website Settings UI in case of an https error or mixed content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 4 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 | Annotate | Revision Log
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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 site_connection_details_ += ASCIIToUTF16("\n\n"); 404 site_connection_details_ += ASCIIToUTF16("\n\n");
405 site_connection_details_ += l10n_util::GetStringUTF16( 405 site_connection_details_ += l10n_util::GetStringUTF16(
406 IDS_PAGE_INFO_SECURITY_TAB_FALLBACK_MESSAGE); 406 IDS_PAGE_INFO_SECURITY_TAB_FALLBACK_MESSAGE);
407 } 407 }
408 if (no_renegotiation) { 408 if (no_renegotiation) {
409 site_connection_details_ += ASCIIToUTF16("\n\n"); 409 site_connection_details_ += ASCIIToUTF16("\n\n");
410 site_connection_details_ += l10n_util::GetStringUTF16( 410 site_connection_details_ += l10n_util::GetStringUTF16(
411 IDS_PAGE_INFO_SECURITY_TAB_RENEGOTIATION_MESSAGE); 411 IDS_PAGE_INFO_SECURITY_TAB_RENEGOTIATION_MESSAGE);
412 } 412 }
413 } 413 }
414
415 // By default select the permissions tab that displays all the site
416 // permissions. In case of a connection error or an issue with the
417 // certificate presented by the website select the connection tab to draw to
418 // users attention to the issue. If the site does not provide a certificate
419 // because it was loaded over an unencrypted connection, don't select the
420 // connection tab.
421 WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS;
422 if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR ||
423 site_connection_status_ == SITE_CONNECTION_STATUS_MIXED_CONTENT ||
424 site_identity_status_ == SITE_IDENTITY_STATUS_ERROR ||
425 site_identity_status_ == SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN)
markusheintz_ 2012/08/21 17:07:07 @wtc: I'm not sure if we should check for the revo
426 tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION;
427 ui_->SetSelectedTab(tab_id);
414 } 428 }
415 429
416 void WebsiteSettings::PresentSitePermissions() { 430 void WebsiteSettings::PresentSitePermissions() {
417 PermissionInfoList permission_info_list; 431 PermissionInfoList permission_info_list;
418 432
419 WebsiteSettingsUI::PermissionInfo permission_info; 433 WebsiteSettingsUI::PermissionInfo permission_info;
420 for (size_t i = 0; i < arraysize(kPermissionType); ++i) { 434 for (size_t i = 0; i < arraysize(kPermissionType); ++i) {
421 permission_info.type = kPermissionType[i]; 435 permission_info.type = kPermissionType[i];
422 436
423 content_settings::SettingInfo info; 437 content_settings::SettingInfo info;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 first_visit_text = l10n_util::GetStringFUTF16( 522 first_visit_text = l10n_util::GetStringFUTF16(
509 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, 523 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY,
510 base::TimeFormatShortDate(first_visit)); 524 base::TimeFormatShortDate(first_visit));
511 } else { 525 } else {
512 first_visit_text = l10n_util::GetStringUTF16( 526 first_visit_text = l10n_util::GetStringUTF16(
513 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); 527 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY);
514 528
515 } 529 }
516 ui_->SetFirstVisit(first_visit_text); 530 ui_->SetFirstVisit(first_visit_text);
517 } 531 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698