// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UPDATES_ANNOUNCEMENT_NOTIFICATION_ANNOUNCEMENT_NOTIFICATION_SERVICE_H_ #define CHROME_BROWSER_UPDATES_ANNOUNCEMENT_NOTIFICATION_ANNOUNCEMENT_NOTIFICATION_SERVICE_H_ #include <memory> #include "base/feature_list.h" #include "components/keyed_service/core/keyed_service.h" #include "url/gurl.h" namespace base { class Clock; } // namespace base class PrefRegistrySimple; class PrefService; class Profile; // Whether to enable announcement notification system. BASE_DECLARE_FEATURE(kAnnouncementNotification); // The Finch parameter name for a boolean value that whether to show // notification on first run. constexpr char kSkipFirstRun[] = …; // The Finch parameter name for a string value that represents a time. // If first run happens after this time, notification will not show. // The string defined in Finch config should specify the time zone. // e.g. 02 Feb 2020 13:00:00 GMT. constexpr char kSkipFirstRunAfterTime[] = …; // The Finch parameter name for a boolean value that whether to show // notification for new profile. constexpr char kSkipNewProfile[] = …; // The Finch parameter to control whether to skip notification display. constexpr char kSkipDisplay[] = …; // The Finch parameter to define the latest version number of the notification. constexpr char kVersion[] = …; // The Finch parameter to define whether to show the announcement to users not // signed in. constexpr char kRequireSignout[] = …; // The Finch parameter to define whether to show the announcement to users not // signed in. constexpr char kShowOneAllProfiles[] = …; // The Finch parameter to define the announcement URL. constexpr char kAnnouncementUrl[] = …; // Preference name to persist the current version sent from Finch parameter. constexpr char kCurrentVersionPrefName[] = …; // Preference name to persist the time of Chrome first run. constexpr char kAnnouncementFirstRunTimePrefName[] = …; // Used to show a notification when the version defined in Finch parameter is // higher than the last version saved in the preference service. class AnnouncementNotificationService : public KeyedService { … }; #endif // CHROME_BROWSER_UPDATES_ANNOUNCEMENT_NOTIFICATION_ANNOUNCEMENT_NOTIFICATION_SERVICE_H_