ChromeLabs: Add New Badge and configuration logic in PrefService
This CL does not integrate the New Badge with IPH because doing so
would require each experiment to have it’s own IPH configuration.
However, we want feature teams to be able to add their experiments into
Chrome Labs with ease. We have therefore decided to proceed with a
simplified approach that shows the new badge label for 7 days once the
user first sees the badge. (Note that Chrome Labs will only launch to
Canary, Dev, and Beta.) We will monitor response to the new badge label
and reduce the time frame if needed.
This CL registers a dictionary pref and adds new experiments to the
desired PrefService when instantiating the Chrome Labs button in the
toolbar. A future CL will use information from this dictionary pref
to also show a blue dot on the Chrome Labs button if there are new
experiments (See Mocks in Bug).
Dictionary values will be cleaned up if the experiment is removed
from Chrome Labs.
Bug: 1218247
Change-Id: I72b47e7637706e6857bfe3029fcf267c0f366477
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2951650
Reviewed-by: Dominic Battré <[email protected]>
Reviewed-by: Erik Chen <[email protected]>
Reviewed-by: Dana Fried <[email protected]>
Commit-Queue: Elaine Chien <[email protected]>
Cr-Commit-Position: refs/heads/master@{#905471}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index a760a6e..c97b999 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -859,6 +859,9 @@
data_use_measurement::ChromeDataUseMeasurement::RegisterPrefs(registry);
BrowserProcessImpl::RegisterPrefs(registry);
ChromeContentBrowserClient::RegisterLocalStatePrefs(registry);
+#if !BUILDFLAG(IS_CHROMEOS_ASH)
+ chrome_labs_prefs::RegisterLocalStatePrefs(registry);
+#endif
ChromeMetricsServiceClient::RegisterPrefs(registry);
ChromeTracingDelegate::RegisterPrefs(registry);
chrome::enterprise_util::RegisterLocalStatePrefs(registry);