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

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

Issue 10843010: Adds a method to the Performance Monitor Database to fetch the most recent metric. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: using get instead of an iterator Created 8 years, 5 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
Index: chrome/browser/performance_monitor/database.h
diff --git a/chrome/browser/performance_monitor/database.h b/chrome/browser/performance_monitor/database.h
index ecd368958dc6ec3bc486db40f4dfd26af293703a..2c61e4641770769329d9f984e1842b7cfa32b34c 100644
--- a/chrome/browser/performance_monitor/database.h
+++ b/chrome/browser/performance_monitor/database.h
@@ -158,6 +158,18 @@ class Database {
std::vector<std::string> GetActiveActivities(MetricType metric_type,
const base::Time& start);
+ // Populate info with the most recent activity. Return false if populate
+ // was unsuccessful.
+ bool GetRecentStatsForActivityAndMetric(const std::string& activity,
+ MetricType metric,
+ MetricInfo* info);
+
+ bool GetRecentStatsForActivityAndMetric(MetricType metric, MetricInfo* info) {
+ return GetRecentStatsForActivityAndMetric(kProcessChromeAggregate,
+ metric,
+ info);
+ }
+
// Query given |metric_type| and |activity|.
MetricInfoVector GetStatsForActivityAndMetric(const std::string& activity,
MetricType metric_type,
« no previous file with comments | « no previous file | chrome/browser/performance_monitor/database.cc » ('j') | chrome/browser/performance_monitor/database.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698