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

Unified Diff: chrome/browser/metrics/metrics_log.cc

Issue 11615002: Exclude PluginService for builds with enable_plugins==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years 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/extensions/extension_service_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_log.cc
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index 8a799979f265347c30a9dcb169610742f5507663..0a074d82e9c730ab8b0857ad2a1d7296d84b5e21 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -340,7 +340,6 @@ void MetricsLog::RecordIncrementalStabilityElements(
OPEN_ELEMENT_FOR_SCOPE("stability"); // Minimal set of stability elements.
WriteRequiredStabilityAttributes(pref);
WriteRealtimeStabilityAttributes(pref);
-
WritePluginStabilityElements(plugin_list, pref);
}
}
@@ -433,6 +432,8 @@ void MetricsLog::WritePluginStabilityElements(
return;
OPEN_ELEMENT_FOR_SCOPE("plugins");
+
+#if defined(ENABLE_PLUGINS)
SystemProfileProto::Stability* stability =
uma_proto()->mutable_system_profile()->mutable_stability();
PluginPrefs* plugin_prefs = GetPluginPrefs();
@@ -505,6 +506,7 @@ void MetricsLog::WritePluginStabilityElements(
plugin_stability->set_crash_count(crashes);
plugin_stability->set_loading_error_count(loading_errors);
}
+#endif // defined(ENABLE_PLUGINS)
pref->ClearPref(prefs::kStabilityPluginStats);
}
@@ -604,9 +606,10 @@ void MetricsLog::WritePluginList(
bool write_as_xml) {
DCHECK(!locked());
- PluginPrefs* plugin_prefs = GetPluginPrefs();
-
OPEN_ELEMENT_FOR_SCOPE("plugins");
+
+#if defined(ENABLE_PLUGINS)
+ PluginPrefs* plugin_prefs = GetPluginPrefs();
SystemProfileProto* system_profile = uma_proto()->mutable_system_profile();
for (std::vector<webkit::WebPluginInfo>::const_iterator iter =
plugin_list.begin();
@@ -638,6 +641,7 @@ void MetricsLog::WritePluginList(
SetPluginInfo(*iter, plugin_prefs, plugin);
}
}
+#endif // defined(ENABLE_PLUGINS)
}
void MetricsLog::WriteInstallElement() {
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698