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

Unified Diff: chrome/browser/metrics/plugin_metrics_provider.h

Issue 441013002: Eliminate MetricsProvider::RecordCurrentState() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/metrics/plugin_metrics_provider.h
diff --git a/chrome/browser/metrics/plugin_metrics_provider.h b/chrome/browser/metrics/plugin_metrics_provider.h
index baabcf746df0bc5a1f499815ca0898d56e7078d0..c274d893613ac843d04b8d1811150482f4cb6687 100644
--- a/chrome/browser/metrics/plugin_metrics_provider.h
+++ b/chrome/browser/metrics/plugin_metrics_provider.h
@@ -25,6 +25,8 @@ struct WebPluginInfo;
class PrefRegistrySimple;
class PrefService;
+extern const int kRecordStateDelaySec;
Alexei Svitkine (slow) 2014/08/05 20:13:12 I don't think this needs to be in the header.
gayane -on leave until 09-2017 2014/08/05 21:24:55 Done.
+
// PluginMetricsProvider is responsible for adding out plugin information to
// the UMA proto.
class PluginMetricsProvider : public metrics::MetricsProvider,
@@ -42,7 +44,7 @@ class PluginMetricsProvider : public metrics::MetricsProvider,
metrics::SystemProfileProto* system_profile_proto) OVERRIDE;
virtual void ProvideStabilityMetrics(
metrics::SystemProfileProto* system_profile_proto) OVERRIDE;
- virtual void RecordCurrentState() OVERRIDE;
+ void RecordCurrentState();
// Notifies the provider about an error loading the plugin at |plugin_path|.
void LogPluginLoadingError(const base::FilePath& plugin_path);
@@ -57,6 +59,10 @@ class PluginMetricsProvider : public metrics::MetricsProvider,
// Registers local state prefs used by this class.
static void RegisterPrefs(PrefRegistrySimple* registry);
+ // Posts delayed execution for RecordCurrentState. Returns true if new task is
Alexei Svitkine (slow) 2014/08/05 20:13:12 Nit: "delayed execution" -> "a delayed task"
gayane -on leave until 09-2017 2014/08/05 21:24:55 Done.
+ // posted and false if there was one already waiting for execution.
+ bool DelayedRecordCurrentState(int delay_sec);
Alexei Svitkine (slow) 2014/08/05 20:13:12 Move this function definition above the static fun
gayane -on leave until 09-2017 2014/08/05 21:24:55 Done.
+
private:
struct ChildProcessStats;
« no previous file with comments | « no previous file | chrome/browser/metrics/plugin_metrics_provider.cc » ('j') | chrome/browser/metrics/plugin_metrics_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698