Commit a9be0cc4 authored by Jeffrey Young's avatar Jeffrey Young Committed by Chromium LUCI CQ

assistant: disable launcher assistant privacy notice

Dead code will be removed in follow-up CL.
https://chromium-review.googlesource.com/c/chromium/src/+/2567093

BUG=b:174506130

Cq-Include-Trybots: luci.chrome.try:linux-chromeos-chrome
Change-Id: I60505ad3ceb2bec51486b28271bcf96811c1c3e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567255Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarRachel Wong <wrong@chromium.org>
Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Jeffrey Young <cowmoo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833881}
parent 9ce881cb
...@@ -112,12 +112,6 @@ void SetAssistantPrivacyInfoShownCount(int count) { ...@@ -112,12 +112,6 @@ void SetAssistantPrivacyInfoShownCount(int count) {
prefs->SetInteger(prefs::kAssistantPrivacyInfoShownInLauncher, count); prefs->SetInteger(prefs::kAssistantPrivacyInfoShownInLauncher, count);
} }
bool IsAssistantPrivacyInfoDismissed() {
PrefService* prefs =
Shell::Get()->session_controller()->GetLastActiveUserPrefService();
return prefs->GetBoolean(prefs::kAssistantPrivacyInfoDismissedInLauncher);
}
void SetAssistantPrivacyInfoDismissed() { void SetAssistantPrivacyInfoDismissed() {
PrefService* prefs = PrefService* prefs =
Shell::Get()->session_controller()->GetLastActiveUserPrefService(); Shell::Get()->session_controller()->GetLastActiveUserPrefService();
...@@ -1323,19 +1317,8 @@ bool AppListControllerImpl::IsAssistantAllowedAndEnabled() const { ...@@ -1323,19 +1317,8 @@ bool AppListControllerImpl::IsAssistantAllowedAndEnabled() const {
} }
bool AppListControllerImpl::ShouldShowAssistantPrivacyInfo() const { bool AppListControllerImpl::ShouldShowAssistantPrivacyInfo() const {
if (!IsAssistantAllowedAndEnabled()) // TODO(b/174506130) completely remove Assistant privacy info in followup.
return false; return false;
if (!app_list_features::IsAssistantSearchEnabled())
return false;
const bool dismissed = IsAssistantPrivacyInfoDismissed();
if (dismissed)
return false;
const int count = GetAssistantPrivacyInfoShownCount();
constexpr int kThresholdToShow = 6;
return count >= 0 && count <= kThresholdToShow;
} }
void AppListControllerImpl::MarkAssistantPrivacyInfoDismissed() { void AppListControllerImpl::MarkAssistantPrivacyInfoDismissed() {
......
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