| 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/storage_partition_impl_map.h" | 5 #include "content/browser/storage_partition_impl_map.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 storage::FileSystemContext* file_system_context) | 55 storage::FileSystemContext* file_system_context) |
| 56 : blob_storage_context_(blob_storage_context), | 56 : blob_storage_context_(blob_storage_context), |
| 57 stream_context_(stream_context), | 57 stream_context_(stream_context), |
| 58 file_system_context_(file_system_context) {} | 58 file_system_context_(file_system_context) {} |
| 59 | 59 |
| 60 virtual ~BlobProtocolHandler() { | 60 virtual ~BlobProtocolHandler() { |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual net::URLRequestJob* MaybeCreateJob( | 63 virtual net::URLRequestJob* MaybeCreateJob( |
| 64 net::URLRequest* request, | 64 net::URLRequest* request, |
| 65 net::NetworkDelegate* network_delegate) const OVERRIDE { | 65 net::NetworkDelegate* network_delegate) const override { |
| 66 scoped_refptr<Stream> stream = | 66 scoped_refptr<Stream> stream = |
| 67 stream_context_->registry()->GetStream(request->url()); | 67 stream_context_->registry()->GetStream(request->url()); |
| 68 if (stream.get()) | 68 if (stream.get()) |
| 69 return new StreamURLRequestJob(request, network_delegate, stream); | 69 return new StreamURLRequestJob(request, network_delegate, stream); |
| 70 | 70 |
| 71 if (!blob_protocol_handler_) { | 71 if (!blob_protocol_handler_) { |
| 72 // Construction is deferred because 'this' is constructed on | 72 // Construction is deferred because 'this' is constructed on |
| 73 // the main thread but we want blob_protocol_handler_ constructed | 73 // the main thread but we want blob_protocol_handler_ constructed |
| 74 // on the IO thread. | 74 // on the IO thread. |
| 75 blob_protocol_handler_.reset(new storage::BlobProtocolHandler( | 75 blob_protocol_handler_.reset(new storage::BlobProtocolHandler( |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 589 |
| 590 // We do not call InitializeURLRequestContext() for media contexts because, | 590 // We do not call InitializeURLRequestContext() for media contexts because, |
| 591 // other than the HTTP cache, the media contexts share the same backing | 591 // other than the HTTP cache, the media contexts share the same backing |
| 592 // objects as their associated "normal" request context. Thus, the previous | 592 // objects as their associated "normal" request context. Thus, the previous |
| 593 // call serves to initialize the media request context for this storage | 593 // call serves to initialize the media request context for this storage |
| 594 // partition as well. | 594 // partition as well. |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace content | 598 } // namespace content |
| OLD | NEW |