summaryrefslogtreecommitdiffstats
path: root/base/observer_list_threadsafe.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a TODO from Jar.mbelshe@google.com2008-11-031-0/+3
| | | | | | Review URL: http://codereview.chromium.org/9262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4475 0039d316-1c4b-4281-b951-d872f2087c98
* The base unittests were succeeding for the isolatedmbelshe@google.com2008-11-031-0/+2
| | | | | | | | | | | | | | | tests, but failed when all tests were run because some tests run without a message loop. The observer_list_threadsafe allowed AddObserver to run with null message loops. But, if you call Notify after doing so, then the notify call would attempt to use the registered "null" ptr to a message loop. This crashed, of course. Review URL: http://codereview.chromium.org/9045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4459 0039d316-1c4b-4281-b951-d872f2087c98
* Make the SystemMonitor observer list thread safe.mbelshe@google.com2008-11-031-2/+6
| | | | | | | | This is done by using the new observer_list_threadsafe. Review URL: http://codereview.chromium.org/4288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4452 0039d316-1c4b-4281-b951-d872f2087c98
* Create a thread-safe observer list. Will be usedmbelshe@google.com2008-10-221-0/+190
by SystemMonitor. Right now the class requires that Observers be RefCounted<>. This is because we invoke tasks via NewRunnableMethod for them. However, because we manually track lifecycle via AddObserver/RemoveObserver, we could override the RunnableMethodTraits to not require RefCounted<>. This would have the advantage that callers do not need to make all Observers be RefCounted, but makes it more critical that observers not forget to call RemoveObserver(). Review URL: http://codereview.chromium.org/7353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3787 0039d316-1c4b-4281-b951-d872f2087c98