Reland "Socialize QuietNotificationPrompt prefs."
This is a reland of c8b3dc82c01b009efffc329a3ede74e0fef22479.
The previous attempt to land led to a compile error, because it clashed with a
concurrently landed CL (crrev.com/c/1944173), which added an #include to
`adaptive_notification_permission_ui_selector.h`, which is renamed by this CL.
Relanding this verbatim, the other CL will be rebased on top of this one.
Original change's description:
> Socialize QuietNotificationPrompt prefs.
>
> Decouple call sites that wish to check the quiet UI state (or the promo
> state) from AdaptiveNotificationPermissionUiSelector, and instead make
> this call sites consult QuietNotificationPermissionUIState, which acts
> a thin layer to read/write preferences.
>
> Rename AdaptiveNotificationPermissionUiSelector to
> AdaptiveQuietNotificationPermissionUiEnabler to better reflect the new
> responsibility of this class is to merely toggle a setting, the actual
> UI will be selected by the PermissionRequestManager.
>
> This CL also renames `permission_features.h`, for consistency, to
> `quiet_notification_permission_ui_config.h`.
>
> Bug: 1028642, 1030216
> Change-Id: If52dfab3532a473399091bf4291e863cf70142f0
> TBR: [email protected]
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948892
> Commit-Queue: Balazs Engedy <[email protected]>
> Reviewed-by: Natalie Chouinard <[email protected]>
> Reviewed-by: Martin Šrámek <[email protected]>
> Reviewed-by: Andy Paicu <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#721449}
Bug: 1028642, 1030216
Change-Id: I6bf5a7fa51da10fd8b7a8cdd7eecca236fbefb1d
TBR: [email protected], [email protected], [email protected]
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950526
Reviewed-by: Balazs Engedy <[email protected]>
Reviewed-by: Martin Šrámek <[email protected]>
Reviewed-by: Andy Paicu <[email protected]>
Commit-Queue: Balazs Engedy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#721479}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 22004b7..20c7c6dd 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -35,7 +35,7 @@
#include "chrome/browser/net/dns_util.h"
#include "chrome/browser/notifications/scheduler/public/features.h"
#include "chrome/browser/performance_manager/graph/policies/policy_features.h"
-#include "chrome/browser/permissions/permission_features.h"
+#include "chrome/browser/permissions/quiet_notification_permission_ui_config.h"
#include "chrome/browser/predictors/loading_predictor_config.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/browser/resource_coordinator/tab_manager_features.h"
@@ -1312,7 +1312,8 @@
const FeatureEntry::FeatureParam
kQuietNotificationPromptsWithAdaptiveActivation[] = {
- {QuietNotificationsPromptConfig::kEnableAdaptiveActivation, "true"}};
+ {QuietNotificationPermissionUiConfig::kEnableAdaptiveActivation,
+ "true"}};
// The default "Enabled" option has the semantics of showing the quiet UI
// (animated location bar indicator on Desktop, and mini-infobars on Android),