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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2736813004: Maintain the current renderer_hang_count in Stability.Counts. (Closed)
Patch Set: Created 3 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 | content/browser/renderer_host/render_view_host_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "content/common/render_message_filter.mojom.h" 66 #include "content/common/render_message_filter.mojom.h"
67 #include "content/common/renderer.mojom.h" 67 #include "content/common/renderer.mojom.h"
68 #include "content/common/site_isolation_policy.h" 68 #include "content/common/site_isolation_policy.h"
69 #include "content/common/swapped_out_messages.h" 69 #include "content/common/swapped_out_messages.h"
70 #include "content/public/browser/ax_event_notification_details.h" 70 #include "content/public/browser/ax_event_notification_details.h"
71 #include "content/public/browser/browser_accessibility_state.h" 71 #include "content/public/browser/browser_accessibility_state.h"
72 #include "content/public/browser/browser_context.h" 72 #include "content/public/browser/browser_context.h"
73 #include "content/public/browser/browser_plugin_guest_manager.h" 73 #include "content/public/browser/browser_plugin_guest_manager.h"
74 #include "content/public/browser/browser_thread.h" 74 #include "content/public/browser/browser_thread.h"
75 #include "content/public/browser/content_browser_client.h" 75 #include "content/public/browser/content_browser_client.h"
76 #include "content/public/browser/notification_service.h"
77 #include "content/public/browser/notification_types.h"
76 #include "content/public/browser/permission_manager.h" 78 #include "content/public/browser/permission_manager.h"
77 #include "content/public/browser/permission_type.h" 79 #include "content/public/browser/permission_type.h"
78 #include "content/public/browser/render_process_host.h" 80 #include "content/public/browser/render_process_host.h"
79 #include "content/public/browser/render_widget_host_view.h" 81 #include "content/public/browser/render_widget_host_view.h"
80 #include "content/public/browser/resource_context.h" 82 #include "content/public/browser/resource_context.h"
81 #include "content/public/browser/storage_partition.h" 83 #include "content/public/browser/storage_partition.h"
82 #include "content/public/browser/stream_handle.h" 84 #include "content/public/browser/stream_handle.h"
83 #include "content/public/browser/user_metrics.h" 85 #include "content/public/browser/user_metrics.h"
84 #include "content/public/common/bindings_policy.h" 86 #include "content/public/common/bindings_policy.h"
85 #include "content/public/common/browser_side_navigation_policy.h" 87 #include "content/public/common/browser_side_navigation_policy.h"
(...skipping 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after
3454 // There is no pending NavigationEntry in these cases, so pass 0 as the 3456 // There is no pending NavigationEntry in these cases, so pass 0 as the
3455 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3457 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3456 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3457 return NavigationHandleImpl::Create( 3459 return NavigationHandleImpl::Create(
3458 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3460 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3459 params.was_within_same_page, base::TimeTicks::Now(), 3461 params.was_within_same_page, base::TimeTicks::Now(),
3460 entry_id_for_data_nav, false); // started_from_context_menu 3462 entry_id_for_data_nav, false); // started_from_context_menu
3461 } 3463 }
3462 3464
3463 void RenderFrameHostImpl::BeforeUnloadTimeout() { 3465 void RenderFrameHostImpl::BeforeUnloadTimeout() {
3466 // Temporarily fire "hung" events to keep the renderer_hang_count from
3467 // Stability.Counts stable.
3468 NotificationService::current()->Notify(NOTIFICATION_RENDER_WIDGET_HOST_HANG,
3469 Source<RenderWidgetHost>(nullptr),
3470 NotificationService::NoDetails());
3471
3464 if (render_view_host_->GetDelegate()->ShouldIgnoreUnresponsiveRenderer()) 3472 if (render_view_host_->GetDelegate()->ShouldIgnoreUnresponsiveRenderer())
3465 return; 3473 return;
3466 3474
3467 UMA_HISTOGRAM_ENUMERATION( 3475 UMA_HISTOGRAM_ENUMERATION(
3468 "ChildProcess.HangRendererType", beforeunload_timeout_type_, 3476 "ChildProcess.HangRendererType", beforeunload_timeout_type_,
3469 RendererUnresponsiveType::RENDERER_UNRESPONSIVE_MAX); 3477 RendererUnresponsiveType::RENDERER_UNRESPONSIVE_MAX);
3470 3478
3471 SimulateBeforeUnloadAck(); 3479 SimulateBeforeUnloadAck();
3472 } 3480 }
3473 3481
3474 } // namespace content 3482 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698