Commit ae644809 authored by Yuzu Saijo's avatar Yuzu Saijo Committed by Commit Bot

Enable detection-only mode for OomIntervention

This CL allows detection-only mode for oom intervention in order to gather
data from finch, while not actually triggering intervention (or the infobar).

Change-Id: I511bf3ccd51218521a526ea001de2a823e1c16bc
Reviewed-on: https://chromium-review.googlesource.com/c/1325583Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606389}
parent 2576522f
...@@ -295,13 +295,10 @@ void OomInterventionTabHelper::StartDetectionInRenderer() { ...@@ -295,13 +295,10 @@ void OomInterventionTabHelper::StartDetectionInRenderer() {
DCHECK(!web_contents()->GetBrowserContext()->IsOffTheRecord()); DCHECK(!web_contents()->GetBrowserContext()->IsOffTheRecord());
const std::string& host = web_contents()->GetVisibleURL().host(); const std::string& host = web_contents()->GetVisibleURL().host();
if (!decider_->CanTriggerIntervention(host)) { if (!decider_->CanTriggerIntervention(host)) {
renderer_pause_enabled = false; return;
navigate_ads_enabled = false;
} }
} }
if (!renderer_pause_enabled && !navigate_ads_enabled)
return;
content::RenderFrameHost* main_frame = web_contents()->GetMainFrame(); content::RenderFrameHost* main_frame = web_contents()->GetMainFrame();
DCHECK(main_frame); DCHECK(main_frame);
content::RenderProcessHost* render_process_host = main_frame->GetProcess(); content::RenderProcessHost* render_process_host = main_frame->GetProcess();
......
...@@ -53,7 +53,6 @@ OomInterventionMetrics OomInterventionImpl::GetCurrentMemoryMetrics() { ...@@ -53,7 +53,6 @@ OomInterventionMetrics OomInterventionImpl::GetCurrentMemoryMetrics() {
void OomInterventionImpl::Check(TimerBase*) { void OomInterventionImpl::Check(TimerBase*) {
DCHECK(host_); DCHECK(host_);
DCHECK(renderer_pause_enabled_ || navigate_ads_enabled_);
OomInterventionMetrics current_memory = GetCurrentMemoryMetrics(); OomInterventionMetrics current_memory = GetCurrentMemoryMetrics();
bool oom_detected = false; bool oom_detected = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment