Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / notifications / profile_notification.h
blob13952333e2ec142ee3496ea563793f6974cc4eba
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 Profile* profile() const { return profile_; }
28 const Notification& notification() const { return notification_; }
30 private:
31 // Weak, guaranteed not to be used after profile removal by parent class.
32 Profile* profile_;
34 Notification notification_;
37 #endif // CHROME_BROWSER_NOTIFICATIONS_PROFILE_NOTIFICATION_H_