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

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

Issue 1278473002: Abstract notion of off-the-record in OmniboxMetricsProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@omnibox_metrics_provider_notification
Patch Set: Fix Created 5 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/omnibox_metrics_provider.h
diff --git a/chrome/browser/metrics/omnibox_metrics_provider.h b/chrome/browser/metrics/omnibox_metrics_provider.h
index 875f616eaac4778f71ae107057f4152dfa61ca8a..fc86adf8e5e54255e0e94369f7f82a39c75a4270 100644
--- a/chrome/browser/metrics/omnibox_metrics_provider.h
+++ b/chrome/browser/metrics/omnibox_metrics_provider.h
@@ -16,7 +16,8 @@ struct OmniboxLog;
// section of the UMA proto.
class OmniboxMetricsProvider : public metrics::MetricsProvider {
public:
- OmniboxMetricsProvider();
+ explicit OmniboxMetricsProvider(
+ const base::Callback<bool(void)>& is_off_the_record_callback);
~OmniboxMetricsProvider() override;
// metrics::MetricsDataProvider:
@@ -40,6 +41,10 @@ class OmniboxMetricsProvider : public metrics::MetricsProvider {
// proto when ProvideGeneralMetrics() is called.
metrics::ChromeUserMetricsExtension omnibox_events_cache;
+ // Callback passed in from the embedder that returns whether the user is
+ // currently operating off-the-record.
+ const base::Callback<bool(void)> is_off_the_record_callback_;
+
DISALLOW_COPY_AND_ASSIGN(OmniboxMetricsProvider);
};
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.cc ('k') | chrome/browser/metrics/omnibox_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698