| 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1015 |
| 1016 request->set_load_flags(load_flags); | 1016 request->set_load_flags(load_flags); |
| 1017 request->SetPriority(request_data.priority); | 1017 request->SetPriority(request_data.priority); |
| 1018 | 1018 |
| 1019 // Resolve elements from request_body and prepare upload data. | 1019 // Resolve elements from request_body and prepare upload data. |
| 1020 if (request_data.request_body.get()) { | 1020 if (request_data.request_body.get()) { |
| 1021 request->set_upload(make_scoped_ptr( | 1021 request->set_upload(make_scoped_ptr( |
| 1022 request_data.request_body->ResolveElementsAndCreateUploadDataStream( | 1022 request_data.request_body->ResolveElementsAndCreateUploadDataStream( |
| 1023 filter_->blob_storage_context()->controller(), | 1023 filter_->blob_storage_context()->controller(), |
| 1024 filter_->file_system_context(), | 1024 filter_->file_system_context(), |
| 1025 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)))); | 1025 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) |
| 1026 .get()))); |
| 1026 } | 1027 } |
| 1027 | 1028 |
| 1028 bool allow_download = request_data.allow_download && | 1029 bool allow_download = request_data.allow_download && |
| 1029 ResourceType::IsFrame(request_data.resource_type); | 1030 ResourceType::IsFrame(request_data.resource_type); |
| 1030 | 1031 |
| 1031 // Make extra info and read footer (contains request ID). | 1032 // Make extra info and read footer (contains request ID). |
| 1032 ResourceRequestInfoImpl* extra_info = | 1033 ResourceRequestInfoImpl* extra_info = |
| 1033 new ResourceRequestInfoImpl( | 1034 new ResourceRequestInfoImpl( |
| 1034 process_type, | 1035 process_type, |
| 1035 child_id, | 1036 child_id, |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1874 DelegateMap::iterator it = delegate_map_.find(id); | 1875 DelegateMap::iterator it = delegate_map_.find(id); |
| 1875 DCHECK(it->second->HasObserver(delegate)); | 1876 DCHECK(it->second->HasObserver(delegate)); |
| 1876 it->second->RemoveObserver(delegate); | 1877 it->second->RemoveObserver(delegate); |
| 1877 if (it->second->size() == 0) { | 1878 if (it->second->size() == 0) { |
| 1878 delete it->second; | 1879 delete it->second; |
| 1879 delegate_map_.erase(it); | 1880 delegate_map_.erase(it); |
| 1880 } | 1881 } |
| 1881 } | 1882 } |
| 1882 | 1883 |
| 1883 } // namespace content | 1884 } // namespace content |
| OLD | NEW |