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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | |
|
wtc
2012/08/21 21:45:32
Nit: add a comma (,) between "the website" and "se
markusheintz_
2012/08/21 22:29:44
Done.
| |
| 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 22:29:44
@wtc: I'm not sure if we should check for the revo
wtc
2012/08/22 19:02:27
Not checking for SITE_IDENTITY_STATUS_CERT_REVOCAT
markusheintz_
2012/08/23 00:12:32
Good point. I'll keep the check for now.
| |
| 426 tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION; | |
|
wtc
2012/08/21 21:45:32
Nit: add curly braces {} because the conditional e
markusheintz_
2012/08/21 22:29:44
I was recently told that multi line conditions don
markusheintz_
2012/08/21 22:29:44
I was recently told that multi line conditions don
| |
| 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 Loading... | |
| 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 } |
| OLD | NEW |