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

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

Issue 1001623002: Add profiling to track jank in ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread. (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 | « chrome/browser/ui/browser.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 2123
2124 if (a_uploading_size != b_uploading_size) 2124 if (a_uploading_size != b_uploading_size)
2125 return a_uploading_size > b_uploading_size; 2125 return a_uploading_size > b_uploading_size;
2126 2126
2127 return a.load_state.state > b.load_state.state; 2127 return a.load_state.state > b.load_state.state;
2128 } 2128 }
2129 2129
2130 // static 2130 // static
2131 void ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread( 2131 void ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread(
2132 scoped_ptr<LoadInfoMap> info_map) { 2132 scoped_ptr<LoadInfoMap> info_map) {
2133 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
2134 // is fixed.
2135 tracked_objects::ScopedTracker tracking_profile(
2136 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2137 "466285 ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread"));
2133 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 2138 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
2134 for (const auto& load_info : *info_map) { 2139 for (const auto& load_info : *info_map) {
2135 RenderViewHostImpl* view = RenderViewHostImpl::FromID( 2140 RenderViewHostImpl* view = RenderViewHostImpl::FromID(
2136 load_info.first.child_id, load_info.first.route_id); 2141 load_info.first.child_id, load_info.first.route_id);
2137 // The view could be gone at this point. 2142 // The view could be gone at this point.
2138 if (view) { 2143 if (view) {
2139 view->LoadStateChanged(load_info.second.url, load_info.second.load_state, 2144 view->LoadStateChanged(load_info.second.url, load_info.second.load_state,
2140 load_info.second.upload_position, 2145 load_info.second.upload_position,
2141 load_info.second.upload_size); 2146 load_info.second.upload_size);
2142 } 2147 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 2357
2353 // Add a flag to selectively bypass the data reduction proxy if the resource 2358 // Add a flag to selectively bypass the data reduction proxy if the resource
2354 // type is not an image. 2359 // type is not an image.
2355 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2360 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2356 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2361 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2357 2362
2358 return load_flags; 2363 return load_flags;
2359 } 2364 }
2360 2365
2361 } // namespace content 2366 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698