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

Side by Side Diff: content/common/notification_service.h

Issue 7622012: Removal of Profile from content part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/content_notification_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file describes a central switchboard for notifications that might 5 // This file describes a central switchboard for notifications that might
6 // happen in various parts of the application, and allows users to register 6 // happen in various parts of the application, and allows users to register
7 // observers for various classes of events that they're interested in. 7 // observers for various classes of events that they're interested in.
8 8
9 #ifndef CONTENT_COMMON_NOTIFICATION_SERVICE_H_ 9 #ifndef CONTENT_COMMON_NOTIFICATION_SERVICE_H_
10 #define CONTENT_COMMON_NOTIFICATION_SERVICE_H_ 10 #define CONTENT_COMMON_NOTIFICATION_SERVICE_H_
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const NotificationSource& source, 42 const NotificationSource& source,
43 const NotificationDetails& details); 43 const NotificationDetails& details);
44 44
45 // Returns a NotificationSource that represents all notification sources 45 // Returns a NotificationSource that represents all notification sources
46 // (for the purpose of registering an observer for events from all sources). 46 // (for the purpose of registering an observer for events from all sources).
47 static Source<void> AllSources() { return Source<void>(NULL); } 47 static Source<void> AllSources() { return Source<void>(NULL); }
48 48
49 // Returns the same value as AllSources(). This function has semantic 49 // Returns the same value as AllSources(). This function has semantic
50 // differences to the programmer: We have checked that this AllSources() 50 // differences to the programmer: We have checked that this AllSources()
51 // usage is safe in the face of multiple profiles. Objects that were 51 // usage is safe in the face of multiple profiles. Objects that were
52 // singletons now will always have multiple instances, one per profile. 52 // singletons now will always have multiple instances, one per browser
53 // context.
53 // 54 //
54 // Some usage is safe, where the Source is checked to see if it's a member of 55 // Some usage is safe, where the Source is checked to see if it's a member of
55 // a container before use. But, we want the number of AllSources() calls to 56 // a container before use. But, we want the number of AllSources() calls to
56 // drop to almost nothing, because most usages are not multiprofile safe and 57 // drop to almost nothing, because most usages are not multiprofile safe and
57 // were done because it was easier to listen to everything. 58 // were done because it was easier to listen to everything.
58 static Source<void> AllBrowserContextsAndSources() { 59 static Source<void> AllBrowserContextsAndSources() {
59 return Source<void>(NULL); 60 return Source<void>(NULL);
60 } 61 }
61 62
62 // Returns a NotificationDetails object that represents a lack of details 63 // Returns a NotificationDetails object that represents a lack of details
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 #ifndef NDEBUG 116 #ifndef NDEBUG
116 // Used to check to see that AddObserver and RemoveObserver calls are 117 // Used to check to see that AddObserver and RemoveObserver calls are
117 // balanced. 118 // balanced.
118 NotificationObserverCount observer_counts_; 119 NotificationObserverCount observer_counts_;
119 #endif 120 #endif
120 121
121 DISALLOW_COPY_AND_ASSIGN(NotificationService); 122 DISALLOW_COPY_AND_ASSIGN(NotificationService);
122 }; 123 };
123 124
124 #endif // CONTENT_COMMON_NOTIFICATION_SERVICE_H_ 125 #endif // CONTENT_COMMON_NOTIFICATION_SERVICE_H_
OLDNEW
« 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