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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // An implementation of webkit_blob::BlobProtocolHandler that gets | 75 // An implementation of webkit_blob::BlobProtocolHandler that gets |
76 // the BlobData from ResourceRequestInfoImpl. | 76 // the BlobData from ResourceRequestInfoImpl. |
77 class WebKitBlobProtocolHandlerImpl | 77 class WebKitBlobProtocolHandlerImpl |
78 : public webkit_blob::BlobProtocolHandler { | 78 : public webkit_blob::BlobProtocolHandler { |
79 public: | 79 public: |
80 WebKitBlobProtocolHandlerImpl( | 80 WebKitBlobProtocolHandlerImpl( |
81 webkit_blob::BlobStorageController* blob_storage_controller, | 81 webkit_blob::BlobStorageController* blob_storage_controller, |
82 StreamContext* stream_context, | 82 StreamContext* stream_context, |
83 fileapi::FileSystemContext* file_system_context) | 83 fileapi::FileSystemContext* file_system_context) |
84 : webkit_blob::BlobProtocolHandler( | 84 : webkit_blob::BlobProtocolHandler( |
85 blob_storage_controller, file_system_context, | 85 blob_storage_controller, |
86 BrowserThread::GetMessageLoopProxyForThread( | 86 file_system_context, |
87 BrowserThread::FILE)), | 87 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) |
| 88 .get()), |
88 stream_context_(stream_context) {} | 89 stream_context_(stream_context) {} |
89 | 90 |
90 virtual ~WebKitBlobProtocolHandlerImpl() {} | 91 virtual ~WebKitBlobProtocolHandlerImpl() {} |
91 | 92 |
92 virtual net::URLRequestJob* MaybeCreateJob( | 93 virtual net::URLRequestJob* MaybeCreateJob( |
93 net::URLRequest* request, | 94 net::URLRequest* request, |
94 net::NetworkDelegate* network_delegate) const OVERRIDE { | 95 net::NetworkDelegate* network_delegate) const OVERRIDE { |
95 scoped_refptr<Stream> stream = | 96 scoped_refptr<Stream> stream = |
96 stream_context_->registry()->GetStream(request->url()); | 97 stream_context_->registry()->GetStream(request->url()); |
97 if (stream.get()) | 98 if (stream.get()) |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 580 |
580 // We do not call InitializeURLRequestContext() for media contexts because, | 581 // We do not call InitializeURLRequestContext() for media contexts because, |
581 // other than the HTTP cache, the media contexts share the same backing | 582 // other than the HTTP cache, the media contexts share the same backing |
582 // objects as their associated "normal" request context. Thus, the previous | 583 // objects as their associated "normal" request context. Thus, the previous |
583 // call serves to initialize the media request context for this storage | 584 // call serves to initialize the media request context for this storage |
584 // partition as well. | 585 // partition as well. |
585 } | 586 } |
586 } | 587 } |
587 | 588 |
588 } // namespace content | 589 } // namespace content |
OLD | NEW |