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

Side by Side Diff: ios/chrome/browser/safe_browsing/ping_manager.cc

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add header Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/safe_browsing/ping_manager.h" 5 #include "ios/chrome/browser/safe_browsing/ping_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 safebrowsing_reports_.insert(fetcher); 127 safebrowsing_reports_.insert(fetcher);
128 } 128 }
129 129
130 void SafeBrowsingPingManager::ReportInvalidCertificateChain( 130 void SafeBrowsingPingManager::ReportInvalidCertificateChain(
131 const std::string& serialized_report) { 131 const std::string& serialized_report) {
132 DCHECK(certificate_error_reporter_); 132 DCHECK(certificate_error_reporter_);
133 certificate_error_reporter_->SendExtendedReportingReport(serialized_report); 133 certificate_error_reporter_->SendExtendedReportingReport(serialized_report);
134 } 134 }
135 135
136 void SafeBrowsingPingManager::SetCertificateErrorReporterForTesting( 136 void SafeBrowsingPingManager::SetCertificateErrorReporterForTesting(
137 scoped_ptr<certificate_reporting::ErrorReporter> 137 std::unique_ptr<certificate_reporting::ErrorReporter>
138 certificate_error_reporter) { 138 certificate_error_reporter) {
139 certificate_error_reporter_ = std::move(certificate_error_reporter); 139 certificate_error_reporter_ = std::move(certificate_error_reporter);
140 } 140 }
141 141
142 GURL SafeBrowsingPingManager::SafeBrowsingHitUrl( 142 GURL SafeBrowsingPingManager::SafeBrowsingHitUrl(
143 const safe_browsing::HitReport& hit_report) const { 143 const safe_browsing::HitReport& hit_report) const {
144 DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE || 144 DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE ||
145 hit_report.threat_type == SB_THREAT_TYPE_URL_PHISHING || 145 hit_report.threat_type == SB_THREAT_TYPE_URL_PHISHING ||
146 hit_report.threat_type == SB_THREAT_TYPE_URL_UNWANTED || 146 hit_report.threat_type == SB_THREAT_TYPE_URL_UNWANTED ||
147 hit_report.threat_type == SB_THREAT_TYPE_BINARY_MALWARE_URL || 147 hit_report.threat_type == SB_THREAT_TYPE_BINARY_MALWARE_URL ||
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 url_prefix_.c_str(), client_name_.c_str(), version_.c_str()); 209 url_prefix_.c_str(), client_name_.c_str(), version_.c_str());
210 std::string api_key = google_apis::GetAPIKey(); 210 std::string api_key = google_apis::GetAPIKey();
211 if (!api_key.empty()) { 211 if (!api_key.empty()) {
212 base::StringAppendF(&url, "&key=%s", 212 base::StringAppendF(&url, "&key=%s",
213 net::EscapeQueryParamValue(api_key, true).c_str()); 213 net::EscapeQueryParamValue(api_key, true).c_str());
214 } 214 }
215 return GURL(url); 215 return GURL(url);
216 } 216 }
217 217
218 } // namespace safe_browsing 218 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698