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

Unified Diff: chrome/browser/memory/memory_kills_histogram.h

Issue 2527973003: Consolidate code monitoring low memory kills and OOM kills to MemoryKillsMonitor on ChromeOS. (Closed)
Patch Set: restrict it to ChromeoS Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/memory/memory_kills_histogram.h
diff --git a/components/arc/metrics/oom_kills_histogram.h b/chrome/browser/memory/memory_kills_histogram.h
similarity index 63%
rename from components/arc/metrics/oom_kills_histogram.h
rename to chrome/browser/memory/memory_kills_histogram.h
index 2a9bf562fa4c8aab5d50189259ad759a4cc41302..07c8b4c68976111417a79f1830cd183ed004e23a 100644
--- a/components/arc/metrics/oom_kills_histogram.h
+++ b/chrome/browser/memory/memory_kills_histogram.h
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_ARC_METRICS_OOM_KILLS_HISTOGRAM_H_
-#define COMPONENTS_ARC_METRICS_OOM_KILLS_HISTOGRAM_H_
+#ifndef CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_
+#define CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_
#include "base/metrics/histogram.h"
hidehiko 2016/11/25 10:13:21 #include "base/time/time.h", too?
cylee1 2016/11/29 20:28:40 Done.
-namespace arc {
+namespace memory {
-const int kMaxOomMemoryKillTimeDeltaSecs = 30;
+const int kMaxMemoryKillTimeDeltaSecs = 30;
hidehiko 2016/11/25 10:13:21 base::TimeDelta supports constexpr. So, constexpr
cylee1 2016/11/29 20:28:40 Done.
-} // namespace arc
+} // namespace memory
// Use this macro to report elapsed time since last OOM kill event.
// Must be a macro as the underlying HISTOGRAM macro creates static variables.
#define UMA_HISTOGRAM_OOM_KILL_TIME_INTERVAL(name, sample) \
UMA_HISTOGRAM_CUSTOM_TIMES( \
name, sample, base::TimeDelta::FromMilliseconds(1), \
- base::TimeDelta::FromSeconds(::arc::kMaxOomMemoryKillTimeDeltaSecs), 50)
+ base::TimeDelta::FromSeconds(::memory::kMaxMemoryKillTimeDeltaSecs), 50)
-#endif // COMPONENTS_ARC_METRICS_OOM_KILLS_HISTOGRAM_H_
+#endif // CHROME_BROWSER_MEMORY_MEMORY_KILLS_HISTOGRAM_H_

Powered by Google App Engine
This is Rietveld 408576698