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

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

Issue 972773002: Add more ScopedTrackers to track down jank in the RDH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oops Created 5 years, 9 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 | no next file » | 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 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 } 2155 }
2156 } 2156 }
2157 } 2157 }
2158 2158
2159 scoped_ptr<ResourceDispatcherHostImpl::LoadInfoMap> 2159 scoped_ptr<ResourceDispatcherHostImpl::LoadInfoMap>
2160 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes() { 2160 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes() {
2161 // Populate this map with load state changes, and then send them on to the UI 2161 // Populate this map with load state changes, and then send them on to the UI
2162 // thread where they can be passed along to the respective RVHs. 2162 // thread where they can be passed along to the respective RVHs.
2163 scoped_ptr<LoadInfoMap> info_map(new LoadInfoMap()); 2163 scoped_ptr<LoadInfoMap> info_map(new LoadInfoMap());
2164 2164
2165 tracked_objects::ScopedTracker tracking_profile0(
2166 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2167 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes0"));
2168
2165 for (const auto& loader : pending_loaders_) { 2169 for (const auto& loader : pending_loaders_) {
2166 // Also poll for upload progress on this timer and send upload progress ipc 2170 // Also poll for upload progress on this timer and send upload progress ipc
2167 // messages to the plugin process. 2171 // messages to the plugin process.
2168 { 2172 {
2169 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is 2173 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
2170 // fixed. 2174 // fixed.
2171 tracked_objects::ScopedTracker tracking_profile1( 2175 tracked_objects::ScopedTracker tracking_profile1(
2172 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2176 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2173 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes1")); 2177 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes1"));
2174 loader.second->ReportUploadProgress(); 2178 loader.second->ReportUploadProgress();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 // fixed. 2230 // fixed.
2227 tracked_objects::ScopedTracker tracking_profile( 2231 tracked_objects::ScopedTracker tracking_profile(
2228 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2232 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2229 "455952 ResourceDispatcherHostImpl::UpdateLoadInfo")); 2233 "455952 ResourceDispatcherHostImpl::UpdateLoadInfo"));
2230 2234
2231 scoped_ptr<LoadInfoMap> info_map(GetLoadInfoForAllRoutes()); 2235 scoped_ptr<LoadInfoMap> info_map(GetLoadInfoForAllRoutes());
2232 2236
2233 if (info_map->empty()) 2237 if (info_map->empty())
2234 return; 2238 return;
2235 2239
2240 tracked_objects::ScopedTracker tracking_profile2(
2241 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2242 "455952 ResourceDispatcherHostImpl::UpdateLoadInfo2"));
2243
2236 BrowserThread::PostTask( 2244 BrowserThread::PostTask(
2237 BrowserThread::UI, FROM_HERE, 2245 BrowserThread::UI, FROM_HERE,
2238 base::Bind(&ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread, 2246 base::Bind(&ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread,
2239 base::Passed(&info_map))); 2247 base::Passed(&info_map)));
2240 } 2248 }
2241 2249
2242 void ResourceDispatcherHostImpl::BlockRequestsForRoute(int child_id, 2250 void ResourceDispatcherHostImpl::BlockRequestsForRoute(int child_id,
2243 int route_id) { 2251 int route_id) {
2244 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2252 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2245 GlobalRoutingID key(child_id, route_id); 2253 GlobalRoutingID key(child_id, route_id);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 2403
2396 // Add a flag to selectively bypass the data reduction proxy if the resource 2404 // Add a flag to selectively bypass the data reduction proxy if the resource
2397 // type is not an image. 2405 // type is not an image.
2398 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2406 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2399 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2407 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2400 2408
2401 return load_flags; 2409 return load_flags;
2402 } 2410 }
2403 2411
2404 } // namespace content 2412 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698