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

Unified Diff: content/browser/appcache/appcache_update_job_unittest.cc

Issue 1874893002: Convert //content/browser 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 | « content/browser/appcache/appcache_update_job.h ('k') | content/browser/appcache/appcache_url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_update_job_unittest.cc
diff --git a/content/browser/appcache/appcache_update_job_unittest.cc b/content/browser/appcache/appcache_update_job_unittest.cc
index 9820bc273bf99ecd94568ee0d220289c332a6058..18ba66fdedebbc0379d8a03135c68dca81e8586a 100644
--- a/content/browser/appcache/appcache_update_job_unittest.cc
+++ b/content/browser/appcache/appcache_update_job_unittest.cc
@@ -6,12 +6,14 @@
#include <stddef.h>
#include <stdint.h>
+
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
@@ -578,12 +580,12 @@ class IOThread : public base::Thread {
}
void Init() override {
- scoped_ptr<net::URLRequestJobFactoryImpl> factory(
+ std::unique_ptr<net::URLRequestJobFactoryImpl> factory(
new net::URLRequestJobFactoryImpl());
factory->SetProtocolHandler("http",
- make_scoped_ptr(new MockHttpServerJobFactory));
+ base::WrapUnique(new MockHttpServerJobFactory));
factory->SetProtocolHandler("https",
- make_scoped_ptr(new MockHttpServerJobFactory));
+ base::WrapUnique(new MockHttpServerJobFactory));
job_factory_ = std::move(factory);
request_context_.reset(new net::TestURLRequestContext());
request_context_->set_job_factory(job_factory_.get());
@@ -595,8 +597,8 @@ class IOThread : public base::Thread {
}
private:
- scoped_ptr<net::URLRequestJobFactory> job_factory_;
- scoped_ptr<net::URLRequestContext> request_context_;
+ std::unique_ptr<net::URLRequestJobFactory> job_factory_;
+ std::unique_ptr<net::URLRequestContext> request_context_;
};
class AppCacheUpdateJobTest : public testing::Test,
@@ -805,7 +807,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler("http",
- make_scoped_ptr(new RedirectFactory));
+ base::WrapUnique(new RedirectFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -1691,7 +1693,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new RetryRequestTestJobFactory));
+ "http", base::WrapUnique(new RetryRequestTestJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -1725,7 +1727,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new RetryRequestTestJobFactory));
+ "http", base::WrapUnique(new RetryRequestTestJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -1760,7 +1762,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new RetryRequestTestJobFactory));
+ "http", base::WrapUnique(new RetryRequestTestJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -1794,7 +1796,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new RetryRequestTestJobFactory));
+ "http", base::WrapUnique(new RetryRequestTestJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -1828,7 +1830,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new RetryRequestTestJobFactory));
+ "http", base::WrapUnique(new RetryRequestTestJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -2694,7 +2696,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new IfModifiedSinceJobFactory));
+ "http", base::WrapUnique(new IfModifiedSinceJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -2766,7 +2768,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new IfModifiedSinceJobFactory));
+ "http", base::WrapUnique(new IfModifiedSinceJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -2830,7 +2832,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new IfModifiedSinceJobFactory));
+ "http", base::WrapUnique(new IfModifiedSinceJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -2894,7 +2896,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new IfModifiedSinceJobFactory));
+ "http", base::WrapUnique(new IfModifiedSinceJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -2933,7 +2935,7 @@ class AppCacheUpdateJobTest : public testing::Test,
net::URLRequestJobFactoryImpl* new_factory(
new net::URLRequestJobFactoryImpl);
new_factory->SetProtocolHandler(
- "http", make_scoped_ptr(new IfModifiedSinceJobFactory));
+ "http", base::WrapUnique(new IfModifiedSinceJobFactory));
io_thread_->SetNewJobFactory(new_factory);
MakeService();
@@ -3422,14 +3424,14 @@ class AppCacheUpdateJobTest : public testing::Test,
MANIFEST_WITH_INTERCEPT
};
- scoped_ptr<IOThread> io_thread_;
+ std::unique_ptr<IOThread> io_thread_;
- scoped_ptr<MockAppCacheService> service_;
+ std::unique_ptr<MockAppCacheService> service_;
scoped_refptr<AppCacheGroup> group_;
scoped_refptr<AppCache> protect_newest_cache_;
- scoped_ptr<base::WaitableEvent> event_;
+ std::unique_ptr<base::WaitableEvent> event_;
- scoped_ptr<AppCacheResponseWriter> response_writer_;
+ std::unique_ptr<AppCacheResponseWriter> response_writer_;
// Hosts used by an async test that need to live until update job finishes.
// Otherwise, test can put host on the stack instead of here.
« no previous file with comments | « content/browser/appcache/appcache_update_job.h ('k') | content/browser/appcache/appcache_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698