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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2259523003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 // Implementation of the SafeBrowsingBlockingPage class. 5 // Implementation of the SafeBrowsingBlockingPage class.
6 6
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // This must be done after calculating |interstitial_reason_| above. 177 // This must be done after calculating |interstitial_reason_| above.
178 security_interstitials::MetricsHelper::ReportDetails reporting_info; 178 security_interstitials::MetricsHelper::ReportDetails reporting_info;
179 reporting_info.metric_prefix = GetMetricPrefix(); 179 reporting_info.metric_prefix = GetMetricPrefix();
180 reporting_info.extra_suffix = GetExtraMetricsSuffix(); 180 reporting_info.extra_suffix = GetExtraMetricsSuffix();
181 reporting_info.rappor_prefix = GetRapporPrefix(); 181 reporting_info.rappor_prefix = GetRapporPrefix();
182 reporting_info.deprecated_rappor_prefix = GetDeprecatedRapporPrefix(); 182 reporting_info.deprecated_rappor_prefix = GetDeprecatedRapporPrefix();
183 reporting_info.rappor_report_type = 183 reporting_info.rappor_report_type =
184 rappor::LOW_FREQUENCY_SAFEBROWSING_RAPPOR_TYPE; 184 rappor::LOW_FREQUENCY_SAFEBROWSING_RAPPOR_TYPE;
185 reporting_info.deprecated_rappor_report_type = 185 reporting_info.deprecated_rappor_report_type =
186 rappor::SAFEBROWSING_RAPPOR_TYPE; 186 rappor::SAFEBROWSING_RAPPOR_TYPE;
187 set_metrics_helper(base::WrapUnique(new ChromeMetricsHelper( 187 set_metrics_helper(base::MakeUnique<ChromeMetricsHelper>(
188 web_contents, request_url(), reporting_info, GetSamplingEventName()))); 188 web_contents, request_url(), reporting_info, GetSamplingEventName()));
189 metrics_helper()->RecordUserDecision( 189 metrics_helper()->RecordUserDecision(
190 security_interstitials::MetricsHelper::SHOW); 190 security_interstitials::MetricsHelper::SHOW);
191 metrics_helper()->RecordUserInteraction( 191 metrics_helper()->RecordUserInteraction(
192 security_interstitials::MetricsHelper::TOTAL_VISITS); 192 security_interstitials::MetricsHelper::TOTAL_VISITS);
193 if (IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled)) { 193 if (IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled)) {
194 metrics_helper()->RecordUserDecision( 194 metrics_helper()->RecordUserDecision(
195 security_interstitials::MetricsHelper::PROCEEDING_DISABLED); 195 security_interstitials::MetricsHelper::PROCEEDING_DISABLED);
196 } 196 }
197 197
198 if (!is_main_frame_load_blocked_) { 198 if (!is_main_frame_load_blocked_) {
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } else { 753 } else {
754 load_time_data->SetString( 754 load_time_data->SetString(
755 "finalParagraph", 755 "finalParagraph",
756 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); 756 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH));
757 } 757 }
758 758
759 PopulateExtendedReportingOption(load_time_data); 759 PopulateExtendedReportingOption(load_time_data);
760 } 760 }
761 761
762 } // namespace safe_browsing 762 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/permission_reporter.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698