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

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

Issue 2405013002: Move some global feature defines to buildflags (Closed)
Patch Set: Comment Created 4 years, 2 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
« no previous file with comments | « chrome/browser/interstitials/chrome_metrics_helper.h ('k') | chrome/browser/plugins/plugin_finder.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 8b0e1ca83fbcaf556ca5761da3abc42ad0beb7b9..54e5e2ea8e44da4afa9c834553417869f9d2cb51 100644
--- a/chrome/browser/interstitials/chrome_metrics_helper.cc
+++ b/chrome/browser/interstitials/chrome_metrics_helper.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/features.h"
#include "components/history/core/browser/history_service.h"
#include "components/rappor/rappor_service.h"
#include "content/public/browser/web_contents.h"
@@ -15,7 +16,7 @@
#include "chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h"
#endif
-#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
+#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
#include "chrome/browser/ssl/captive_portal_metrics_recorder.h"
#endif
@@ -33,7 +34,7 @@ ChromeMetricsHelper::ChromeMetricsHelper(
g_browser_process->rappor_service()
? g_browser_process->rappor_service()->AsWeakPtr()
: base::WeakPtr<rappor::RapporService>()),
-#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) || defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) || defined(ENABLE_EXTENSIONS)
web_contents_(web_contents),
#endif
request_url_(request_url),
@@ -44,14 +45,14 @@ ChromeMetricsHelper::ChromeMetricsHelper(
ChromeMetricsHelper::~ChromeMetricsHelper() {}
void ChromeMetricsHelper::StartRecordingCaptivePortalMetrics(bool overridable) {
-#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
+#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
captive_portal_recorder_.reset(
new CaptivePortalMetricsRecorder(web_contents_, overridable));
#endif
}
void ChromeMetricsHelper::RecordExtraShutdownMetrics() {
-#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
+#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
// The captive portal metrics should be recorded when the interstitial is
// closing (or destructing).
if (captive_portal_recorder_)
« no previous file with comments | « chrome/browser/interstitials/chrome_metrics_helper.h ('k') | chrome/browser/plugins/plugin_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698