Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10830182: net: Return size of upload as well as position from URLRequest::GetUploadProgress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.cc ('k') | content/browser/renderer_host/resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698