| OLD | NEW |
| 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 <stack> | 5 #include <stack> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 ~IOThread() override { Stop(); } | 156 ~IOThread() override { Stop(); } |
| 157 | 157 |
| 158 net::URLRequestContext* request_context() { | 158 net::URLRequestContext* request_context() { |
| 159 return request_context_.get(); | 159 return request_context_.get(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void Init() override { | 162 void Init() override { |
| 163 scoped_ptr<net::URLRequestJobFactoryImpl> factory( | 163 scoped_ptr<net::URLRequestJobFactoryImpl> factory( |
| 164 new net::URLRequestJobFactoryImpl()); | 164 new net::URLRequestJobFactoryImpl()); |
| 165 factory->SetProtocolHandler( | 165 factory->SetProtocolHandler( |
| 166 "http", | 166 "http", make_scoped_ptr(new MockHttpServerJobFactory( |
| 167 new MockHttpServerJobFactory( | 167 make_scoped_ptr(new AppCacheInterceptor())))); |
| 168 make_scoped_ptr(new AppCacheInterceptor()))); | |
| 169 job_factory_ = factory.Pass(); | 168 job_factory_ = factory.Pass(); |
| 170 request_context_.reset(new net::TestURLRequestContext()); | 169 request_context_.reset(new net::TestURLRequestContext()); |
| 171 request_context_->set_job_factory(job_factory_.get()); | 170 request_context_->set_job_factory(job_factory_.get()); |
| 172 } | 171 } |
| 173 | 172 |
| 174 void CleanUp() override { | 173 void CleanUp() override { |
| 175 request_context_.reset(); | 174 request_context_.reset(); |
| 176 job_factory_.reset(); | 175 job_factory_.reset(); |
| 177 } | 176 } |
| 178 | 177 |
| (...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); | 2020 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize2); |
| 2022 } | 2021 } |
| 2023 | 2022 |
| 2024 TEST_F(AppCacheStorageImplTest, Reinitialize3) { | 2023 TEST_F(AppCacheStorageImplTest, Reinitialize3) { |
| 2025 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); | 2024 RunTestOnIOThread(&AppCacheStorageImplTest::Reinitialize3); |
| 2026 } | 2025 } |
| 2027 | 2026 |
| 2028 // That's all folks! | 2027 // That's all folks! |
| 2029 | 2028 |
| 2030 } // namespace content | 2029 } // namespace content |
| OLD | NEW |