// Copyright 2019 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_NOTIFICATIONS_SCHEDULER_INTERNAL_IMPRESSION_TYPES_H_ #define CHROME_BROWSER_NOTIFICATIONS_SCHEDULER_INTERNAL_IMPRESSION_TYPES_H_ #include <map> #include <optional> #include <string> #include "base/containers/circular_deque.h" #include "base/time/time.h" #include "chrome/browser/notifications/scheduler/public/notification_scheduler_types.h" namespace notifications { // Contains data to determine when a notification should be shown to the user // and the user impression towards this notification. // // Life cycle: // 1. Created after the notification is shown to the user. // 2. |feedback| is set after the user interacts with the notification. // 3. Notification scheduler API consumer gets the user feedback and generates // an impression result, which may affect notification exposure. // 4. The impression is deleted after it expires. struct Impression { … }; // Contains details about supression and recovery after suppression expired. struct SuppressionInfo { … }; // Stores the global states about how often the notification can be shown // to the user and the history of user interactions to a particular notification // client. struct ClientState { … }; } // namespace notifications #endif // CHROME_BROWSER_NOTIFICATIONS_SCHEDULER_INTERNAL_IMPRESSION_TYPES_H_