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

Side by Side Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 10907182: Add UMA counter for hung renderers on cross-site navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing on current tree. Created 8 years, 2 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
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | 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 #include "content/browser/web_contents/render_view_host_manager.h" 5 #include "content/browser/web_contents/render_view_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (pending_render_view_host_->are_navigations_suspended()) 188 if (pending_render_view_host_->are_navigations_suspended())
189 pending_render_view_host_->SetNavigationsSuspended(false); 189 pending_render_view_host_->SetNavigationsSuspended(false);
190 } else { 190 } else {
191 // The request has been started and paused while we're waiting for the 191 // The request has been started and paused while we're waiting for the
192 // unload handler to finish. We'll pretend that it did, by notifying the 192 // unload handler to finish. We'll pretend that it did, by notifying the
193 // IO thread to let the response continue. The pending renderer will then 193 // IO thread to let the response continue. The pending renderer will then
194 // be swapped in as part of the usual DidNavigate logic. (If the unload 194 // be swapped in as part of the usual DidNavigate logic. (If the unload
195 // handler later finishes, this call will be ignored because the state in 195 // handler later finishes, this call will be ignored because the state in
196 // CrossSiteResourceHandler will already be cleaned up.) 196 // CrossSiteResourceHandler will already be cleaned up.)
197 ViewMsg_SwapOut_Params params; 197 ViewMsg_SwapOut_Params params;
198 params.closing_process_id = render_view_host_->GetProcess()->GetID();
199 params.closing_route_id = render_view_host_->GetRoutingID();
198 params.new_render_process_host_id = 200 params.new_render_process_host_id =
199 pending_render_view_host_->GetProcess()->GetID(); 201 pending_render_view_host_->GetProcess()->GetID();
200 params.new_request_id = pending_request_id; 202 params.new_request_id = pending_request_id;
201 current_host()->GetProcess()->SimulateSwapOutACK(params); 203 current_host()->GetProcess()->SimulateSwapOutACK(params);
202 } 204 }
203 return false; 205 return false;
204 } 206 }
205 207
206 void RenderViewHostManager::DidNavigateMainFrame( 208 void RenderViewHostManager::DidNavigateMainFrame(
207 RenderViewHost* render_view_host) { 209 RenderViewHost* render_view_host) {
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 } 967 }
966 968
967 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 969 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
968 SiteInstance* instance) { 970 SiteInstance* instance) {
969 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 971 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
970 if (iter != swapped_out_hosts_.end()) 972 if (iter != swapped_out_hosts_.end())
971 return iter->second; 973 return iter->second;
972 974
973 return NULL; 975 return NULL;
974 } 976 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698