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 "content/browser/resource_context_impl.h" | 5 #include "content/browser/resource_context_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/appcache/chrome_appcache_service.h" | 8 #include "content/browser/appcache/chrome_appcache_service.h" |
9 #include "content/browser/fileapi/browser_file_system_helper.h" | 9 #include "content/browser/fileapi/browser_file_system_helper.h" |
10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 bool set_protocol = job_factory->SetProtocolHandler( | 156 bool set_protocol = job_factory->SetProtocolHandler( |
157 chrome::kBlobScheme, | 157 chrome::kBlobScheme, |
158 new BlobProtocolHandler( | 158 new BlobProtocolHandler( |
159 GetBlobStorageControllerForResourceContext(resource_context), | 159 GetBlobStorageControllerForResourceContext(resource_context), |
160 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); | 160 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); |
161 DCHECK(set_protocol); | 161 DCHECK(set_protocol); |
162 set_protocol = job_factory->SetProtocolHandler( | 162 set_protocol = job_factory->SetProtocolHandler( |
163 chrome::kFileSystemScheme, | 163 chrome::kFileSystemScheme, |
164 CreateFileSystemProtocolHandler( | 164 CreateFileSystemProtocolHandler( |
165 GetFileSystemContextForResourceContext(resource_context), | 165 GetFileSystemContextForResourceContext(resource_context))); |
166 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); | |
167 DCHECK(set_protocol); | 166 DCHECK(set_protocol); |
168 | 167 |
169 job_factory->AddInterceptor(new DeveloperProtocolHandler( | 168 job_factory->AddInterceptor(new DeveloperProtocolHandler( |
170 ResourceContext::GetAppCacheService(resource_context), | 169 ResourceContext::GetAppCacheService(resource_context), |
171 GetBlobStorageControllerForResourceContext(resource_context))); | 170 GetBlobStorageControllerForResourceContext(resource_context))); |
172 | 171 |
173 // TODO(jam): Add the ProtocolHandlerRegistryIntercepter here! | 172 // TODO(jam): Add the ProtocolHandlerRegistryIntercepter here! |
174 } | 173 } |
175 | 174 |
176 } // namespace | 175 } // namespace |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 BrowserThread::PostTask( | 264 BrowserThread::PostTask( |
266 BrowserThread::IO, FROM_HERE, | 265 BrowserThread::IO, FROM_HERE, |
267 base::Bind(&InitializeRequestContext, | 266 base::Bind(&InitializeRequestContext, |
268 resource_context, | 267 resource_context, |
269 make_scoped_refptr( | 268 make_scoped_refptr( |
270 browser_context->GetRequestContextForMedia()))); | 269 browser_context->GetRequestContextForMedia()))); |
271 } | 270 } |
272 } | 271 } |
273 | 272 |
274 } // namespace content | 273 } // namespace content |
OLD | NEW |