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

Unified Diff: components/precache/core/precache_fetcher_unittest.cc

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « components/precache/core/precache_fetcher.cc ('k') | components/proxy_config/pref_proxy_config_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/core/precache_fetcher_unittest.cc
diff --git a/components/precache/core/precache_fetcher_unittest.cc b/components/precache/core/precache_fetcher_unittest.cc
index 2ab96df6a234e3208130c9638a08c995e383d0b0..3b8d356122dbc473e394ddeb77e1cd3e25a4337f 100644
--- a/components/precache/core/precache_fetcher_unittest.cc
+++ b/components/precache/core/precache_fetcher_unittest.cc
@@ -7,6 +7,7 @@
#include <stdint.h>
#include <cstring>
+#include <memory>
#include <set>
#include <string>
#include <vector>
@@ -15,8 +16,8 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/test/histogram_tester.h"
@@ -64,11 +65,13 @@ class TestURLFetcherCallback {
public:
TestURLFetcherCallback() : total_response_bytes_(0) {}
- scoped_ptr<net::FakeURLFetcher> CreateURLFetcher(
- const GURL& url, net::URLFetcherDelegate* delegate,
- const std::string& response_data, net::HttpStatusCode response_code,
+ std::unique_ptr<net::FakeURLFetcher> CreateURLFetcher(
+ const GURL& url,
+ net::URLFetcherDelegate* delegate,
+ const std::string& response_data,
+ net::HttpStatusCode response_code,
net::URLRequestStatus::Status status) {
- scoped_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
+ std::unique_ptr<net::FakeURLFetcher> fetcher(new net::FakeURLFetcher(
url, delegate, response_data, response_code, status));
total_response_bytes_ += response_data.size();
@@ -111,12 +114,13 @@ class MockURLFetcherFactory : public net::URLFetcherFactory {
net::URLFetcher::RequestType request_type,
net::URLFetcherDelegate* delegate);
- scoped_ptr<net::URLFetcher> CreateURLFetcher(
+ std::unique_ptr<net::URLFetcher> CreateURLFetcher(
int id,
const GURL& url,
net::URLFetcher::RequestType request_type,
net::URLFetcherDelegate* delegate) override {
- return make_scoped_ptr(DoCreateURLFetcher(id, url, request_type, delegate));
+ return base::WrapUnique(
+ DoCreateURLFetcher(id, url, request_type, delegate));
}
// The method to mock out, instead of CreateURLFetcher. This is necessary
« no previous file with comments | « components/precache/core/precache_fetcher.cc ('k') | components/proxy_config/pref_proxy_config_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698