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

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

Issue 1130343006: Don't share ResourceDispatcherHostImpl's timer for reporting upload progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@safari-backend
Patch Set: Fixes for mmenke Created 5 years, 7 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
« no previous file with comments | « no previous file | content/browser/loader/resource_loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 } 2172 }
2173 } 2173 }
2174 2174
2175 scoped_ptr<ResourceDispatcherHostImpl::LoadInfoMap> 2175 scoped_ptr<ResourceDispatcherHostImpl::LoadInfoMap>
2176 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes() { 2176 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes() {
2177 // Populate this map with load state changes, and then send them on to the UI 2177 // Populate this map with load state changes, and then send them on to the UI
2178 // thread where they can be passed along to the respective RVHs. 2178 // thread where they can be passed along to the respective RVHs.
2179 scoped_ptr<LoadInfoMap> info_map(new LoadInfoMap()); 2179 scoped_ptr<LoadInfoMap> info_map(new LoadInfoMap());
2180 2180
2181 for (const auto& loader : pending_loaders_) { 2181 for (const auto& loader : pending_loaders_) {
2182 // Also poll for upload progress on this timer and send upload progress ipc
2183 // messages to the plugin process.
2184 loader.second->ReportUploadProgress();
Andre 2015/05/22 17:24:46 Oops, forgot to move this from the other CL.
2185
2186 net::URLRequest* request = loader.second->request(); 2182 net::URLRequest* request = loader.second->request();
2187 net::UploadProgress upload_progress = request->GetUploadProgress(); 2183 net::UploadProgress upload_progress = request->GetUploadProgress();
2188 2184
2189 LoadInfo load_info; 2185 LoadInfo load_info;
2190 load_info.url = request->url(); 2186 load_info.url = request->url();
2191 load_info.load_state = request->GetLoadState(); 2187 load_info.load_state = request->GetLoadState();
2192 load_info.upload_size = upload_progress.size(); 2188 load_info.upload_size = upload_progress.size();
2193 load_info.upload_position = upload_progress.position(); 2189 load_info.upload_position = upload_progress.position();
2194 2190
2195 GlobalRoutingID id(loader.second->GetRequestInfo()->GetGlobalRoutingID()); 2191 GlobalRoutingID id(loader.second->GetRequestInfo()->GetGlobalRoutingID());
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 2365
2370 // Add a flag to selectively bypass the data reduction proxy if the resource 2366 // Add a flag to selectively bypass the data reduction proxy if the resource
2371 // type is not an image. 2367 // type is not an image.
2372 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2368 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2373 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2369 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2374 2370
2375 return load_flags; 2371 return load_flags;
2376 } 2372 }
2377 2373
2378 } // namespace content 2374 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/resource_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698