Add ICU message format support
[chromium-blink-merge.git] / chrome / browser / notifications / profile_notification.h
blob8350121866c6198202e7d785c3c19e26b5f5e16b
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PROFILE_NOTIFICATION_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PROFILE_NOTIFICATION_H_
8 #include <string>
10 #include "chrome/browser/notifications/notification.h"
11 #include "chrome/browser/notifications/notification_ui_manager.h"
13 // This class keeps a Notification objects and its corresponding Profile, so
14 // that when the Notification UI manager needs to return or cancel all
15 // notifications for a given Profile we have the ability to do this.
16 class ProfileNotification {
17 public:
18 // Returns a string that uniquely identifies a profile + delegate_id pair.
19 // The profile_id is used as an identifier to identify a profile instance; it
20 // cannot be NULL. The ID becomes invalid when a profile is destroyed.
21 static std::string GetProfileNotificationId(const std::string& delegate_id,
22 ProfileID profile_id);
24 ProfileNotification(Profile* profile, const Notification& notification);
25 ~ProfileNotification();
27 ProfileID profile_id() const { return profile_id_; }
28 const Notification& notification() const { return notification_; }
30 private:
31 // Used for equality comparision in notification maps.
32 ProfileID profile_id_;
34 Notification notification_;
37 #endif // CHROME_BROWSER_NOTIFICATIONS_PROFILE_NOTIFICATION_H_