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

Unified Diff: chrome/browser/interstitials/chrome_metrics_helper.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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/interstitials/chrome_metrics_helper.h ('k') | chrome/browser/io_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/interstitials/chrome_metrics_helper.cc
diff --git a/chrome/browser/interstitials/chrome_metrics_helper.cc b/chrome/browser/interstitials/chrome_metrics_helper.cc
index 54e5e2ea8e44da4afa9c834553417869f9d2cb51..f69b390a1f5039b01dc485ae2bcb29f1f22d2733 100644
--- a/chrome/browser/interstitials/chrome_metrics_helper.cc
+++ b/chrome/browser/interstitials/chrome_metrics_helper.cc
@@ -11,8 +11,9 @@
#include "components/history/core/browser/history_service.h"
#include "components/rappor/rappor_service.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/features/features.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h"
#endif
@@ -34,7 +35,7 @@ ChromeMetricsHelper::ChromeMetricsHelper(
g_browser_process->rappor_service()
? g_browser_process->rappor_service()->AsWeakPtr()
: base::WeakPtr<rappor::RapporService>()),
-#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) || defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) || BUILDFLAG(ENABLE_EXTENSIONS)
web_contents_(web_contents),
#endif
request_url_(request_url),
@@ -62,7 +63,7 @@ void ChromeMetricsHelper::RecordExtraShutdownMetrics() {
void ChromeMetricsHelper::RecordExtraUserDecisionMetrics(
security_interstitials::MetricsHelper::Decision decision) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!sampling_event_.get()) {
sampling_event_.reset(new extensions::ExperienceSamplingEvent(
sampling_event_name_, request_url_,
@@ -88,7 +89,7 @@ void ChromeMetricsHelper::RecordExtraUserDecisionMetrics(
void ChromeMetricsHelper::RecordExtraUserInteractionMetrics(
security_interstitials::MetricsHelper::Interaction interaction) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!sampling_event_.get()) {
sampling_event_.reset(new extensions::ExperienceSamplingEvent(
sampling_event_name_, request_url_,
« no previous file with comments | « chrome/browser/interstitials/chrome_metrics_helper.h ('k') | chrome/browser/io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698