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. |