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

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

Issue 10945042: Add UMA to measure potential impact of Fast Tab Close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forward the "preceed time" from render view host manager. 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
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 } 328 }
329 } else { 329 } else {
330 // Current page says to cancel. 330 // Current page says to cancel.
331 CancelPending(); 331 CancelPending();
332 cross_navigation_pending_ = false; 332 cross_navigation_pending_ = false;
333 } 333 }
334 } else { 334 } else {
335 // Non-cross site transition means closing the entire tab. 335 // Non-cross site transition means closing the entire tab.
336 bool proceed_to_fire_unload; 336 bool proceed_to_fire_unload;
337 delegate_->BeforeUnloadFiredFromRenderManager(proceed, 337 delegate_->BeforeUnloadFiredFromRenderManager(proceed, proceed_time,
338 &proceed_to_fire_unload); 338 &proceed_to_fire_unload);
339 339
340 if (proceed_to_fire_unload) { 340 if (proceed_to_fire_unload) {
341 // This is not a cross-site navigation, the tab is being closed. 341 // This is not a cross-site navigation, the tab is being closed.
342 render_view_host_->ClosePage(); 342 render_view_host_->ClosePage();
343 } 343 }
344 } 344 }
345 } 345 }
346 346
347 void RenderViewHostManager::OnCrossSiteResponse(int new_render_process_host_id, 347 void RenderViewHostManager::OnCrossSiteResponse(int new_render_process_host_id,
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 } 964 }
965 965
966 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 966 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
967 SiteInstance* instance) { 967 SiteInstance* instance) {
968 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 968 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
969 if (iter != swapped_out_hosts_.end()) 969 if (iter != swapped_out_hosts_.end())
970 return iter->second; 970 return iter->second;
971 971
972 return NULL; 972 return NULL;
973 } 973 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698