OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/tools/test_shell/test_shell_request_context.h" | 5 #include "webkit/tools/test_shell/test_shell_request_context.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 blob_storage_controller_.reset(new webkit_blob::BlobStorageController()); | 120 blob_storage_controller_.reset(new webkit_blob::BlobStorageController()); |
121 file_system_context_ = static_cast<SimpleFileSystem*>( | 121 file_system_context_ = static_cast<SimpleFileSystem*>( |
122 WebKit::Platform::current()->fileSystem())->file_system_context(); | 122 WebKit::Platform::current()->fileSystem())->file_system_context(); |
123 | 123 |
124 net::URLRequestJobFactoryImpl* job_factory = | 124 net::URLRequestJobFactoryImpl* job_factory = |
125 new net::URLRequestJobFactoryImpl(); | 125 new net::URLRequestJobFactoryImpl(); |
126 job_factory->SetProtocolHandler( | 126 job_factory->SetProtocolHandler( |
127 "blob", | 127 "blob", |
128 new webkit_blob::BlobProtocolHandler( | 128 new webkit_blob::BlobProtocolHandler( |
129 blob_storage_controller_.get(), | 129 blob_storage_controller_.get(), |
130 file_system_context_, | 130 file_system_context_.get(), |
131 SimpleResourceLoaderBridge::GetIoThread())); | 131 SimpleResourceLoaderBridge::GetIoThread())); |
132 job_factory->SetProtocolHandler( | 132 job_factory->SetProtocolHandler( |
133 "filesystem", | 133 "filesystem", |
134 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); | 134 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); |
135 job_factory->SetProtocolHandler("data", new net::DataProtocolHandler); | 135 job_factory->SetProtocolHandler("data", new net::DataProtocolHandler); |
136 job_factory->SetProtocolHandler("file", new net::FileProtocolHandler); | 136 job_factory->SetProtocolHandler("file", new net::FileProtocolHandler); |
137 storage_.set_job_factory(job_factory); | 137 storage_.set_job_factory(job_factory); |
138 } | 138 } |
139 | 139 |
140 TestShellRequestContext::~TestShellRequestContext() { | 140 TestShellRequestContext::~TestShellRequestContext() { |
141 } | 141 } |
OLD | NEW |