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

Side by Side Diff: chromecast/browser/cast_memory_pressure_monitor.cc

Issue 1974473002: Fix include path for moved thread_task_runner_handle.h header in chromecast/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a1_move_task_runner_handle
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chromecast/browser/cast_memory_pressure_monitor.h" 5 #include "chromecast/browser/cast_memory_pressure_monitor.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/process/process_metrics.h" 9 #include "base/process/process_metrics.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
11 #include "chromecast/base/metrics/cast_metrics_helper.h" 11 #include "chromecast/base/metrics/cast_metrics_helper.h"
12 12
13 namespace chromecast { 13 namespace chromecast {
14 namespace { 14 namespace {
15 15
16 // Memory thresholds (as fraction of total memory) for memory pressure levels. 16 // Memory thresholds (as fraction of total memory) for memory pressure levels.
17 // See more detailed description of pressure heuristic in PollPressureLevel. 17 // See more detailed description of pressure heuristic in PollPressureLevel.
18 // TODO(halliwell): tune thresholds based on data. 18 // TODO(halliwell): tune thresholds based on data.
19 constexpr float kCriticalMemoryThreshold = 0.2f; 19 constexpr float kCriticalMemoryThreshold = 0.2f;
20 constexpr float kModerateMemoryThreshold = 0.3f; 20 constexpr float kModerateMemoryThreshold = 0.3f;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 if (new_level == current_level_) 76 if (new_level == current_level_)
77 return; 77 return;
78 78
79 current_level_ = new_level; 79 current_level_ = new_level;
80 metrics::CastMetricsHelper::GetInstance()->RecordApplicationEventWithValue( 80 metrics::CastMetricsHelper::GetInstance()->RecordApplicationEventWithValue(
81 "Memory.Pressure.LevelChange", new_level); 81 "Memory.Pressure.LevelChange", new_level);
82 } 82 }
83 83
84 } // namespace chromecast 84 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_browser_main_parts.cc ('k') | chromecast/browser/media/media_pipeline_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698