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

Unified Diff: chrome/browser/performance_monitor/constants.cc

Issue 10907121: Add guards to metric values; erase bad events/metrics from db (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_use_units
Patch Set: Estade's requests Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/performance_monitor/constants.h ('k') | chrome/browser/performance_monitor/database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/performance_monitor/constants.cc
diff --git a/chrome/browser/performance_monitor/constants.cc b/chrome/browser/performance_monitor/constants.cc
index 8efa06add9279645d2a7b0dd5d90458850b41420..dd9a11541792ae88dcaa23d6a81ea0221fd33433 100644
--- a/chrome/browser/performance_monitor/constants.cc
+++ b/chrome/browser/performance_monitor/constants.cc
@@ -4,9 +4,9 @@
#include "chrome/browser/performance_monitor/constants.h"
-namespace performance_monitor {
+#include "base/time.h"
-// TODO(chebert): i18n on all constants.
+namespace performance_monitor {
// The error message displayed when a metric's details are not found.
const char kMetricNotFoundError[] = "Metric details not found.";
@@ -28,4 +28,16 @@ const char kStateChromeVersion[] = "chrome_version";
// collisions in the database.
const char kStateProfilePrefix[] = "profile";
+// Unit values
+// Memory measurements
+const int64 kBytesPerKilobyte = 1 << 10;
+const int64 kBytesPerMegabyte = kBytesPerKilobyte * (1 << 10);
+const int64 kBytesPerGigabyte = kBytesPerMegabyte * (1 << 10);
+const int64 kBytesPerTerabyte = kBytesPerGigabyte * (1 << 10);
+
+// Time measurements
+const int64 kMicrosecondsPerMonth = base::Time::kMicrosecondsPerDay * 30;
+const int64 kMicrosecondsPerYear = base::Time::kMicrosecondsPerDay * 365;
+
+
} // namespace performance_monitor
« no previous file with comments | « chrome/browser/performance_monitor/constants.h ('k') | chrome/browser/performance_monitor/database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698