Chromium Code Reviews| 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_ |