| 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/gtk/website_settings/website_settings_popup_gtk.h" | 5 #include "chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 std::string identity_status_text; | 500 std::string identity_status_text; |
| 501 const GdkColor* color = &ui::kGdkBlack; | 501 const GdkColor* color = &ui::kGdkBlack; |
| 502 | 502 |
| 503 switch (identity_info.identity_status) { | 503 switch (identity_info.identity_status) { |
| 504 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: | 504 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: |
| 505 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: | 505 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: |
| 506 identity_status_text = | 506 identity_status_text = |
| 507 l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_IDENTITY_VERIFIED); | 507 l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_IDENTITY_VERIFIED); |
| 508 color = &kGdkGreen; | 508 color = &kGdkGreen; |
| 509 break; | 509 break; |
| 510 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: |
| 511 identity_status_text = |
| 512 l10n_util::GetStringUTF16(IDS_CERT_POLICY_PROVIDED_CERT_HEADER); |
| 513 break; |
| 510 default: | 514 default: |
| 511 identity_status_text = | 515 identity_status_text = |
| 512 l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_IDENTITY_NOT_VERIFIED); | 516 l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_IDENTITY_NOT_VERIFIED); |
| 513 break; | 517 break; |
| 514 } | 518 } |
| 515 GtkWidget* status_label = CreateTextLabel( | 519 GtkWidget* status_label = CreateTextLabel( |
| 516 identity_status_text, kPopupWidth, theme_service_, *color); | 520 identity_status_text, kPopupWidth, theme_service_, *color); |
| 517 gtk_box_pack_start( | 521 gtk_box_pack_start( |
| 518 GTK_BOX(header_box_), status_label, FALSE, FALSE, 0); | 522 GTK_BOX(header_box_), status_label, FALSE, FALSE, 0); |
| 519 gtk_widget_show_all(header_box_); | 523 gtk_widget_show_all(header_box_); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 } | 737 } |
| 734 | 738 |
| 735 void WebsiteSettingsPopupGtk::OnHelpLinkClicked(GtkWidget* widget) { | 739 void WebsiteSettingsPopupGtk::OnHelpLinkClicked(GtkWidget* widget) { |
| 736 browser_->OpenURL(OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), | 740 browser_->OpenURL(OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), |
| 737 content::Referrer(), | 741 content::Referrer(), |
| 738 NEW_FOREGROUND_TAB, | 742 NEW_FOREGROUND_TAB, |
| 739 content::PAGE_TRANSITION_LINK, | 743 content::PAGE_TRANSITION_LINK, |
| 740 false)); | 744 false)); |
| 741 bubble_->Close(); | 745 bubble_->Close(); |
| 742 } | 746 } |
| OLD | NEW |