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

Unified Diff: chrome/browser/ui/page_info/page_info.cc

Issue 2944253002: Do not pass by non-const reference in page_info.cc (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/page_info/page_info.cc
diff --git a/chrome/browser/ui/page_info/page_info.cc b/chrome/browser/ui/page_info/page_info.cc
index a0e2e5d4452c6e40543270d048f1529024604ba8..90204f5152c4d8c56069cc06405569497d01da11 100644
--- a/chrome/browser/ui/page_info/page_info.cc
+++ b/chrome/browser/ui/page_info/page_info.cc
@@ -164,8 +164,8 @@ void CheckContentStatus(security_state::ContentStatus content_status,
// If the |security_info| indicates that mixed content or certificate errors
// were present, update |connection_status| and |connection_details|.
void ReportAnyInsecureContent(const security_state::SecurityInfo& security_info,
- PageInfo::SiteConnectionStatus& connection_status,
- base::string16& connection_details) {
+ PageInfo::SiteConnectionStatus* connection_status,
+ base::string16* connection_details) {
bool displayed_insecure_content = false;
bool ran_insecure_content = false;
CheckContentStatus(security_info.mixed_content_status,
@@ -183,27 +183,27 @@ void ReportAnyInsecureContent(const security_state::SecurityInfo& security_info,
// Only one insecure content warning is displayed; show the most severe.
if (ran_insecure_content) {
- connection_status =
+ *connection_status =
PageInfo::SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE;
- connection_details.assign(l10n_util::GetStringFUTF16(
- IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, connection_details,
+ connection_details->assign(l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, *connection_details,
l10n_util::GetStringUTF16(
IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR)));
return;
}
if (security_info.contained_mixed_form) {
- connection_status = PageInfo::SITE_CONNECTION_STATUS_INSECURE_FORM_ACTION;
- connection_details.assign(l10n_util::GetStringFUTF16(
- IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, connection_details,
+ *connection_status = PageInfo::SITE_CONNECTION_STATUS_INSECURE_FORM_ACTION;
+ connection_details->assign(l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, *connection_details,
l10n_util::GetStringUTF16(
IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_FORM_WARNING)));
return;
}
if (displayed_insecure_content) {
- connection_status =
+ *connection_status =
PageInfo::SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE;
- connection_details.assign(l10n_util::GetStringFUTF16(
- IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, connection_details,
+ connection_details->assign(l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, *connection_details,
l10n_util::GetStringUTF16(
IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING)));
}
@@ -637,8 +637,8 @@ void PageInfo::Init(const GURL& url,
subject_name));
}
- ReportAnyInsecureContent(security_info, site_connection_status_,
- site_connection_details_);
+ ReportAnyInsecureContent(security_info, &site_connection_status_,
+ &site_connection_details_);
}
uint16_t cipher_suite =
« 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