Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: chrome/browser/notifications/profile_notification.h

Issue 1155453002: Passing ProfileID instead of Profile* to clarify that profile should not be used for making any cal… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/profile_notification.h
diff --git a/chrome/browser/notifications/profile_notification.h b/chrome/browser/notifications/profile_notification.h
index 13952333e2ec142ee3496ea563793f6974cc4eba..3472ffd3e748669e529334e6c32e437632df8dfd 100644
--- a/chrome/browser/notifications/profile_notification.h
+++ b/chrome/browser/notifications/profile_notification.h
@@ -21,15 +21,15 @@ class ProfileNotification {
static std::string GetProfileNotificationId(const std::string& delegate_id,
ProfileID profile_id);
- ProfileNotification(Profile* profile, const Notification& notification);
+ ProfileNotification(ProfileID profile_id, const Notification& notification);
~ProfileNotification();
- Profile* profile() const { return profile_; }
+ ProfileID profile_id() const { return profile_id_; }
const Notification& notification() const { return notification_; }
private:
- // Weak, guaranteed not to be used after profile removal by parent class.
- Profile* profile_;
+ // Used for equality comparision in notification maps.
+ ProfileID profile_id_;
Notification notification_;
};

Powered by Google App Engine
This is Rietveld 408576698