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

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

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another failure missed by my regex Created 5 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 5dd332a3172e1a1c1ba1020dbcfb0abef7096f1f..e7fab2fcbb6461c891fef12aa7439ade02886e6e 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -273,9 +273,9 @@ void ClientSideDetectionService::StartFetchModel() {
if (enabled_) {
// Start fetching the model either from the cache or possibly from the
// network if the model isn't in the cache.
- model_fetcher_.reset(net::URLFetcher::Create(
- 0 /* ID used for testing */, GURL(kClientModelUrl),
- net::URLFetcher::GET, this));
+ model_fetcher_ = net::URLFetcher::Create(0 /* ID used for testing */,
+ GURL(kClientModelUrl),
+ net::URLFetcher::GET, this);
model_fetcher_->SetRequestContext(request_context_getter_.get());
model_fetcher_->Start();
}
@@ -326,10 +326,10 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
return;
}
- net::URLFetcher* fetcher = net::URLFetcher::Create(
- 0 /* ID used for testing */,
- GetClientReportUrl(kClientReportPhishingUrl),
- net::URLFetcher::POST, this);
+ net::URLFetcher* fetcher =
+ net::URLFetcher::Create(0 /* ID used for testing */,
+ GetClientReportUrl(kClientReportPhishingUrl),
+ net::URLFetcher::POST, this).release();
Ryan Sleevi 2015/04/30 18:23:44 line 338
// Remember which callback and URL correspond to the current fetcher object.
ClientReportInfo* info = new ClientReportInfo;
@@ -367,10 +367,10 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
return;
}
- net::URLFetcher* fetcher = net::URLFetcher::Create(
- 0 /* ID used for testing */,
- GetClientReportUrl(kClientReportMalwareUrl),
- net::URLFetcher::POST, this);
+ net::URLFetcher* fetcher =
+ net::URLFetcher::Create(0 /* ID used for testing */,
+ GetClientReportUrl(kClientReportMalwareUrl),
+ net::URLFetcher::POST, this).release();
Ryan Sleevi 2015/04/30 18:23:44 line 379
dtapuska 2015/04/30 19:05:56 That is the way I started doing this CL; changing
// Remember which callback and URL correspond to the current fetcher object.
ClientMalwareReportInfo* info = new ClientMalwareReportInfo;

Powered by Google App Engine
This is Rietveld 408576698