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

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

Issue 966813002: RDH: Add some more instrumentation to figure out jank in RDH. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 net::URLRequest* request = loader.second->request(); 2177 net::URLRequest* request = loader.second->request();
2178 net::UploadProgress upload_progress; 2178 net::UploadProgress upload_progress;
2179 { 2179 {
2180 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is 2180 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
2181 // fixed. 2181 // fixed.
2182 tracked_objects::ScopedTracker tracking_profile2( 2182 tracked_objects::ScopedTracker tracking_profile2(
2183 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2183 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2184 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes2")); 2184 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes2"));
2185 upload_progress = request->GetUploadProgress(); 2185 upload_progress = request->GetUploadProgress();
2186 } 2186 }
2187
2188 tracked_objects::ScopedTracker tracking_profile4(
eroman 2015/02/27 21:25:52 I would suggest measuring TimeTicks manually for t
mmenke 2015/02/27 21:50:22 Good point. For now, I think I'll just do this an
2189 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2190 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes4"));
2191
2187 LoadInfo load_info; 2192 LoadInfo load_info;
2188 load_info.url = request->url(); 2193 load_info.url = request->url();
2189 { 2194 {
2190 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is 2195 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
2191 // fixed. 2196 // fixed.
2192 tracked_objects::ScopedTracker tracking_profile3( 2197 tracked_objects::ScopedTracker tracking_profile3(
2193 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2198 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2194 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes3")); 2199 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes3"));
2195 load_info.load_state = request->GetLoadState(); 2200 load_info.load_state = request->GetLoadState();
2196 } 2201 }
2197 load_info.upload_size = upload_progress.size(); 2202 load_info.upload_size = upload_progress.size();
2198 load_info.upload_position = upload_progress.position(); 2203 load_info.upload_position = upload_progress.position();
2199 2204
2205 tracked_objects::ScopedTracker tracking_profile5(
2206 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2207 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes5"));
2208
2200 GlobalRoutingID id(loader.second->GetRequestInfo()->GetGlobalRoutingID()); 2209 GlobalRoutingID id(loader.second->GetRequestInfo()->GetGlobalRoutingID());
2201 LoadInfoMap::iterator existing = info_map->find(id); 2210 LoadInfoMap::iterator existing = info_map->find(id);
2211
2212 tracked_objects::ScopedTracker tracking_profile6(
2213 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2214 "455952 ResourceDispatcherHostImpl::GetLoadInfoForAllRoutes6"));
2215
2202 if (existing == info_map->end() || 2216 if (existing == info_map->end() ||
2203 LoadInfoIsMoreInteresting(load_info, existing->second)) { 2217 LoadInfoIsMoreInteresting(load_info, existing->second)) {
2204 (*info_map)[id] = load_info; 2218 (*info_map)[id] = load_info;
2205 } 2219 }
2206 } 2220 }
2207 return info_map.Pass(); 2221 return info_map.Pass();
2208 } 2222 }
2209 2223
2210 void ResourceDispatcherHostImpl::UpdateLoadInfo() { 2224 void ResourceDispatcherHostImpl::UpdateLoadInfo() {
2211 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is 2225 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2381 2395
2382 // Add a flag to selectively bypass the data reduction proxy if the resource 2396 // Add a flag to selectively bypass the data reduction proxy if the resource
2383 // type is not an image. 2397 // type is not an image.
2384 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2398 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2385 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2399 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2386 2400
2387 return load_flags; 2401 return load_flags;
2388 } 2402 }
2389 2403
2390 } // namespace content 2404 } // 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