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

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

Issue 2849563003: Rename remaining IDS_PAGEINFO_* strings to IDS_PAGE_INFO_* (Closed)
Patch Set: Rebase Created 3 years, 7 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
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/page_info/page_info.h" 5 #include "chrome/browser/ui/page_info/page_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 void GetSiteIdentityByMaliciousContentStatus( 201 void GetSiteIdentityByMaliciousContentStatus(
202 security_state::MaliciousContentStatus malicious_content_status, 202 security_state::MaliciousContentStatus malicious_content_status,
203 PageInfo::SiteIdentityStatus* status, 203 PageInfo::SiteIdentityStatus* status,
204 base::string16* details) { 204 base::string16* details) {
205 switch (malicious_content_status) { 205 switch (malicious_content_status) {
206 case security_state::MALICIOUS_CONTENT_STATUS_NONE: 206 case security_state::MALICIOUS_CONTENT_STATUS_NONE:
207 NOTREACHED(); 207 NOTREACHED();
208 break; 208 break;
209 case security_state::MALICIOUS_CONTENT_STATUS_MALWARE: 209 case security_state::MALICIOUS_CONTENT_STATUS_MALWARE:
210 *status = PageInfo::SITE_IDENTITY_STATUS_MALWARE; 210 *status = PageInfo::SITE_IDENTITY_STATUS_MALWARE;
211 *details = l10n_util::GetStringUTF16(IDS_PAGEINFO_MALWARE_DETAILS); 211 *details = l10n_util::GetStringUTF16(IDS_PAGE_INFO_MALWARE_DETAILS);
212 break; 212 break;
213 case security_state::MALICIOUS_CONTENT_STATUS_SOCIAL_ENGINEERING: 213 case security_state::MALICIOUS_CONTENT_STATUS_SOCIAL_ENGINEERING:
214 *status = PageInfo::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING; 214 *status = PageInfo::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING;
215 *details = 215 *details =
216 l10n_util::GetStringUTF16(IDS_PAGEINFO_SOCIAL_ENGINEERING_DETAILS); 216 l10n_util::GetStringUTF16(IDS_PAGE_INFO_SOCIAL_ENGINEERING_DETAILS);
217 break; 217 break;
218 case security_state::MALICIOUS_CONTENT_STATUS_UNWANTED_SOFTWARE: 218 case security_state::MALICIOUS_CONTENT_STATUS_UNWANTED_SOFTWARE:
219 *status = PageInfo::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE; 219 *status = PageInfo::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE;
220 *details = 220 *details =
221 l10n_util::GetStringUTF16(IDS_PAGEINFO_UNWANTED_SOFTWARE_DETAILS); 221 l10n_util::GetStringUTF16(IDS_PAGE_INFO_UNWANTED_SOFTWARE_DETAILS);
222 break; 222 break;
223 } 223 }
224 } 224 }
225 225
226 base::string16 GetSimpleSiteName(const GURL& url) { 226 base::string16 GetSimpleSiteName(const GURL& url) {
227 return url_formatter::FormatUrlForSecurityDisplay( 227 return url_formatter::FormatUrlForSecurityDisplay(
228 url, url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS); 228 url, url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS);
229 } 229 }
230 230
231 ChooserContextBase* GetUsbChooserContext(Profile* profile) { 231 ChooserContextBase* GetUsbChooserContext(Profile* profile) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 DCHECK(!certificate_->subject().organization_names.empty()); 491 DCHECK(!certificate_->subject().organization_names.empty());
492 organization_name_ = 492 organization_name_ =
493 UTF8ToUTF16(certificate_->subject().organization_names[0]); 493 UTF8ToUTF16(certificate_->subject().organization_names[0]);
494 // An EV Cert is required to have a city (localityName) and country but 494 // An EV Cert is required to have a city (localityName) and country but
495 // state is "if any". 495 // state is "if any".
496 DCHECK(!certificate_->subject().locality_name.empty()); 496 DCHECK(!certificate_->subject().locality_name.empty());
497 DCHECK(!certificate_->subject().country_name.empty()); 497 DCHECK(!certificate_->subject().country_name.empty());
498 base::string16 locality; 498 base::string16 locality;
499 if (!certificate_->subject().state_or_province_name.empty()) { 499 if (!certificate_->subject().state_or_province_name.empty()) {
500 locality = l10n_util::GetStringFUTF16( 500 locality = l10n_util::GetStringFUTF16(
501 IDS_PAGEINFO_ADDRESS, 501 IDS_PAGE_INFO_ADDRESS,
502 UTF8ToUTF16(certificate_->subject().locality_name), 502 UTF8ToUTF16(certificate_->subject().locality_name),
503 UTF8ToUTF16(certificate_->subject().state_or_province_name), 503 UTF8ToUTF16(certificate_->subject().state_or_province_name),
504 UTF8ToUTF16(certificate_->subject().country_name)); 504 UTF8ToUTF16(certificate_->subject().country_name));
505 } else { 505 } else {
506 locality = l10n_util::GetStringFUTF16( 506 locality = l10n_util::GetStringFUTF16(
507 IDS_PAGEINFO_PARTIAL_ADDRESS, 507 IDS_PAGE_INFO_PARTIAL_ADDRESS,
508 UTF8ToUTF16(certificate_->subject().locality_name), 508 UTF8ToUTF16(certificate_->subject().locality_name),
509 UTF8ToUTF16(certificate_->subject().country_name)); 509 UTF8ToUTF16(certificate_->subject().country_name));
510 } 510 }
511 DCHECK(!certificate_->subject().organization_names.empty()); 511 DCHECK(!certificate_->subject().organization_names.empty());
512 site_identity_details_.assign(l10n_util::GetStringFUTF16( 512 site_identity_details_.assign(l10n_util::GetStringFUTF16(
513 IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_VERIFIED, 513 IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_VERIFIED,
514 UTF8ToUTF16(certificate_->subject().organization_names[0]), 514 UTF8ToUTF16(certificate_->subject().organization_names[0]),
515 locality, UTF8ToUTF16(certificate_->issuer().GetDisplayName()))); 515 locality, UTF8ToUTF16(certificate_->issuer().GetDisplayName())));
516 } else { 516 } else {
517 // Non-EV OK HTTPS page. 517 // Non-EV OK HTTPS page.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 info.site_identity = UTF16ToUTF8(GetSimpleSiteName(site_url_)); 768 info.site_identity = UTF16ToUTF8(GetSimpleSiteName(site_url_));
769 769
770 info.connection_status = site_connection_status_; 770 info.connection_status = site_connection_status_;
771 info.connection_status_description = UTF16ToUTF8(site_connection_details_); 771 info.connection_status_description = UTF16ToUTF8(site_connection_details_);
772 info.identity_status = site_identity_status_; 772 info.identity_status = site_identity_status_;
773 info.identity_status_description = UTF16ToUTF8(site_identity_details_); 773 info.identity_status_description = UTF16ToUTF8(site_identity_details_);
774 info.certificate = certificate_; 774 info.certificate = certificate_;
775 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 775 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
776 ui_->SetIdentityInfo(info); 776 ui_->SetIdentityInfo(info);
777 } 777 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm ('k') | chrome/browser/ui/page_info/page_info_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698