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

Side by Side Diff: content/browser/appcache/appcache_storage_impl_unittest.cc

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/appcache/appcache_storage_impl.h" 5 #include "content/browser/appcache/appcache_storage_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <stack> 10 #include <stack>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 ~IOThread() override { Stop(); } 161 ~IOThread() override { Stop(); }
162 162
163 net::URLRequestContext* request_context() { 163 net::URLRequestContext* request_context() {
164 return request_context_.get(); 164 return request_context_.get();
165 } 165 }
166 166
167 void Init() override { 167 void Init() override {
168 std::unique_ptr<net::URLRequestJobFactoryImpl> factory( 168 std::unique_ptr<net::URLRequestJobFactoryImpl> factory(
169 new net::URLRequestJobFactoryImpl()); 169 new net::URLRequestJobFactoryImpl());
170 factory->SetProtocolHandler( 170 factory->SetProtocolHandler("http",
171 "http", base::WrapUnique(new MockHttpServerJobFactory( 171 base::MakeUnique<MockHttpServerJobFactory>(
172 base::WrapUnique(new AppCacheInterceptor())))); 172 base::MakeUnique<AppCacheInterceptor>()));
173 job_factory_ = std::move(factory); 173 job_factory_ = std::move(factory);
174 request_context_.reset(new net::TestURLRequestContext()); 174 request_context_.reset(new net::TestURLRequestContext());
175 request_context_->set_job_factory(job_factory_.get()); 175 request_context_->set_job_factory(job_factory_.get());
176 } 176 }
177 177
178 void CleanUp() override { 178 void CleanUp() override {
179 request_context_.reset(); 179 request_context_.reset();
180 job_factory_.reset(); 180 job_factory_.reset();
181 } 181 }
182 182
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); 2029 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2);
2030 } 2030 }
2031 2031
2032 TEST_F(AppCacheStorageImplTest, Reinitialize3) { 2032 TEST_F(AppCacheStorageImplTest, Reinitialize3) {
2033 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); 2033 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3);
2034 } 2034 }
2035 2035
2036 // That's all folks! 2036 // That's all folks!
2037 2037
2038 } // namespace content 2038 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698