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/renderer_host/resource_dispatcher_host_impl.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 if (existing != info_map.end()) { | 1624 if (existing != info_map.end()) { |
1625 to_insert = | 1625 to_insert = |
1626 MoreInterestingLoadState(existing->second.load_state, load_state); | 1626 MoreInterestingLoadState(existing->second.load_state, load_state); |
1627 if (to_insert.state == existing->second.load_state.state) | 1627 if (to_insert.state == existing->second.load_state.state) |
1628 continue; | 1628 continue; |
1629 } | 1629 } |
1630 LoadInfo& load_info = info_map[key]; | 1630 LoadInfo& load_info = info_map[key]; |
1631 load_info.url = request->url(); | 1631 load_info.url = request->url(); |
1632 load_info.load_state = to_insert; | 1632 load_info.load_state = to_insert; |
1633 load_info.upload_size = info->GetUploadSize(); | 1633 load_info.upload_size = info->GetUploadSize(); |
1634 load_info.upload_position = request->GetUploadProgress(); | 1634 load_info.upload_position = request->GetUploadProgress().position; |
1635 } | 1635 } |
1636 | 1636 |
1637 if (info_map.empty()) | 1637 if (info_map.empty()) |
1638 return; | 1638 return; |
1639 | 1639 |
1640 BrowserThread::PostTask( | 1640 BrowserThread::PostTask( |
1641 BrowserThread::UI, FROM_HERE, | 1641 BrowserThread::UI, FROM_HERE, |
1642 base::Bind(&LoadInfoUpdateCallback, info_map)); | 1642 base::Bind(&LoadInfoUpdateCallback, info_map)); |
1643 } | 1643 } |
1644 | 1644 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1730 | 1730 |
1731 return i->second.get(); | 1731 return i->second.get(); |
1732 } | 1732 } |
1733 | 1733 |
1734 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, | 1734 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, |
1735 int request_id) const { | 1735 int request_id) const { |
1736 return GetLoader(GlobalRequestID(child_id, request_id)); | 1736 return GetLoader(GlobalRequestID(child_id, request_id)); |
1737 } | 1737 } |
1738 | 1738 |
1739 } // namespace content | 1739 } // namespace content |
OLD | NEW |