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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_service.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/client_side_detection_service.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index 569836a2ef7f8f20d73f9c5b5d75fb95522e12ba..a4823b82bca1728ab16bdc21a58de12aa4554a37 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -5,11 +5,11 @@
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
#include <algorithm>
+#include <memory>
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/single_thread_task_runner.h"
@@ -268,7 +268,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
bool is_extended_reporting,
const ClientReportPhishingRequestCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- scoped_ptr<ClientPhishingRequest> request(verdict);
+ std::unique_ptr<ClientPhishingRequest> request(verdict);
if (!enabled_) {
if (!callback.is_null())
@@ -321,7 +321,7 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
ClientMalwareRequest* verdict,
const ClientReportMalwareRequestCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- scoped_ptr<ClientMalwareRequest> request(verdict);
+ std::unique_ptr<ClientMalwareRequest> request(verdict);
if (!enabled_) {
if (!callback.is_null())
@@ -373,7 +373,7 @@ void ClientSideDetectionService::HandlePhishingVerdict(
const net::ResponseCookies& cookies,
const std::string& data) {
ClientPhishingResponse response;
- scoped_ptr<ClientReportInfo> info(client_phishing_reports_[source]);
+ std::unique_ptr<ClientReportInfo> info(client_phishing_reports_[source]);
bool is_phishing = false;
if (status.is_success() && net::HTTP_OK == response_code &&
response.ParseFromString(data)) {
@@ -408,7 +408,8 @@ void ClientSideDetectionService::HandleMalwareVerdict(
"SBClientMalware.IPBlacklistRequestNetError", -status.error());
ClientMalwareResponse response;
- scoped_ptr<ClientMalwareReportInfo> info(client_malware_reports_[source]);
+ std::unique_ptr<ClientMalwareReportInfo> info(
+ client_malware_reports_[source]);
bool should_blacklist = false;
if (status.is_success() && net::HTTP_OK == response_code &&
response.ParseFromString(data)) {

Powered by Google App Engine
This is Rietveld 408576698