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

Unified Diff: content/common/notification_service.h

Issue 7548022: Profiles: Introduce AllProfilesAndSources(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avi fixes Created 9 years, 5 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
« no previous file with comments | « content/common/content_notification_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/notification_service.h
diff --git a/content/common/notification_service.h b/content/common/notification_service.h
index c6898f504fad271ec7f6eee30f9ce8867fe0c3f8..8040b7fd054f652e4b42ba4ba952a7084618f2df 100644
--- a/content/common/notification_service.h
+++ b/content/common/notification_service.h
@@ -46,6 +46,19 @@ class NotificationService {
// (for the purpose of registering an observer for events from all sources).
static Source<void> AllSources() { return Source<void>(NULL); }
+ // Returns the same value as AllSources(). This function has semantic
+ // differences to the programmer: We have checked that this AllSources()
+ // usage is safe in the face of multiple profiles. Objects that were
+ // singletons now will always have multiple instances, one per profile.
+ //
+ // Some usage is safe, where the Source is checked to see if it's a member of
+ // a container before use. But, we want the number of AllSources() calls to
+ // drop to almost nothing, because most usages are not multiprofile safe and
+ // were done because it was easier to listen to everything.
+ static Source<void> AllBrowserContextsAndSources() {
+ return Source<void>(NULL);
+ }
+
// Returns a NotificationDetails object that represents a lack of details
// associated with a notification. (This is effectively a null pointer.)
static Details<void> NoDetails() { return Details<void>(NULL); }
« no previous file with comments | « content/common/content_notification_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698