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

Unified Diff: chrome/browser/performance_monitor/database.h

Issue 10915318: Revert 157168 - Add guards to metric values; erase bad events/metrics from db (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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.cc ('k') | chrome/browser/performance_monitor/database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/performance_monitor/database.h
===================================================================
--- chrome/browser/performance_monitor/database.h (revision 157181)
+++ chrome/browser/performance_monitor/database.h (working copy)
@@ -31,7 +31,6 @@
};
class KeyBuilder;
-class DatabaseTestHelper;
// The class supporting all performance monitor storage. This class wraps
// multiple leveldb::DB objects. All methods must be called from a background
@@ -153,10 +152,12 @@
}
// Add a metric instance to the database.
- bool AddMetric(const std::string& activity, const Metric& metric);
+ bool AddMetric(const std::string& activity,
+ MetricType metric_type,
+ const std::string& value);
- bool AddMetric(const Metric& metric) {
- return AddMetric(kProcessChromeAggregate, metric);
+ bool AddMetric(MetricType metric_type, const std::string& value) {
+ return AddMetric(kProcessChromeAggregate, metric_type, value);
}
// Get the metrics that are active for the given process between |start|
@@ -235,7 +236,8 @@
}
private:
- friend class DatabaseTestHelper;
+ FRIEND_TEST_ALL_PREFIXES(PerformanceMonitorDatabaseSetupTest, OpenClose);
+ FRIEND_TEST_ALL_PREFIXES(PerformanceMonitorDatabaseSetupTest, ActiveInterval);
typedef std::map<std::string, std::string> RecentMap;
typedef std::map<std::string, double> MaxValueMap;
« no previous file with comments | « chrome/browser/performance_monitor/constants.cc ('k') | chrome/browser/performance_monitor/database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698