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

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

Issue 383213007: ifdef more extensions code to be used only when extensions are enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments, lint Created 6 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/metrics/chrome_stability_metrics_provider.cc
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.cc b/chrome/browser/metrics/chrome_stability_metrics_provider.cc
index f39bbd46caf00447cdeff19043f1b62e28bbe866..7f669eb91bd3167fcbc9f0aad4f625d3f3192d0c 100644
--- a/chrome/browser/metrics/chrome_stability_metrics_provider.cc
+++ b/chrome/browser/metrics/chrome_stability_metrics_provider.cc
@@ -20,7 +20,10 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
+
+#if defined(ENABLE_EXTENSIONS)
#include "extensions/browser/process_map.h"
+#endif
#if defined(ENABLE_PLUGINS)
#include "chrome/browser/metrics/plugin_metrics_provider.h"
@@ -195,9 +198,12 @@ void ChromeStabilityMetricsProvider::LogRendererCrash(
content::RenderProcessHost* host,
base::TerminationStatus status,
int exit_code) {
- bool was_extension_process =
- extensions::ProcessMap::Get(host->GetBrowserContext())
- ->Contains(host->GetID());
+ bool was_extension_process = false;
+#if defined(ENABLE_EXTENSIONS)
+ was_extension_process =
+ extensions::ProcessMap::Get(host->GetBrowserContext())->Contains(
+ host->GetID());
+#endif
if (status == base::TERMINATION_STATUS_PROCESS_CRASHED ||
status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION) {
if (was_extension_process) {

Powered by Google App Engine
This is Rietveld 408576698