Commit 0ff634b6 authored by ziyangch's avatar ziyangch Committed by Commit Bot

[Chromecast] Set opt-in status on Android Things.

-the internal part is eureka-internal/221797

BUG=internal b/120030063

Test=Check the logging when switching from opt-in to opt-out.

Change-Id: Ib42484624007cf28c1a98ffc62851ea7f7656194
Reviewed-on: https://chromium-review.googlesource.com/c/1351283
Commit-Queue: Ziyang Cheng <ziyangch@chromium.org>
Reviewed-by: default avatarSimeon Anfinrud <sanfin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611453}
parent 6de2afd7
...@@ -18,8 +18,15 @@ class ChromecastConfigAndroid { ...@@ -18,8 +18,15 @@ class ChromecastConfigAndroid {
// Returns whether or not the user has allowed sending usage stats and // Returns whether or not the user has allowed sending usage stats and
// crash reports. // crash reports.
// TODO(ziyangch): Remove CanSendUsageStats() and switch to pure callback
// style.
virtual bool CanSendUsageStats() = 0; virtual bool CanSendUsageStats() = 0;
// Set the the user's sending usage stats.
// TODO(ziyangch): Remove SetSendUsageStats() after switching to Crashpad on
// Android.(The CL which does this is at https://crrev.com/c/989401.)
virtual void SetSendUsageStats(bool enabled) = 0;
// Registers a handler to be notified when SendUsageStats is changed. // Registers a handler to be notified when SendUsageStats is changed.
virtual void SetSendUsageStatsChangedCallback( virtual void SetSendUsageStatsChangedCallback(
base::RepeatingCallback<void(bool)> callback) = 0; base::RepeatingCallback<void(bool)> callback) = 0;
......
...@@ -16,6 +16,8 @@ class ChromecastConfigAndroidDummy : public ChromecastConfigAndroid { ...@@ -16,6 +16,8 @@ class ChromecastConfigAndroidDummy : public ChromecastConfigAndroid {
bool CanSendUsageStats() override { return false; } bool CanSendUsageStats() override { return false; }
void SetSendUsageStats(bool enabled) override {}
void SetSendUsageStatsChangedCallback( void SetSendUsageStatsChangedCallback(
base::RepeatingCallback<void(bool)> callback) override {} base::RepeatingCallback<void(bool)> callback) override {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment