diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-22 23:09:21 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-22 23:09:21 +0000 |
commit | 503631cfa06aaae686f2e9a6f55ebc1859e8dab3 (patch) | |
tree | 8bc3a1d62749c65585db050b0926add085485436 /base/build | |
parent | 4d40fd494fc3142ded2eddc2a1becaa7a1584d06 (diff) | |
download | chromium_src-503631cfa06aaae686f2e9a6f55ebc1859e8dab3.zip chromium_src-503631cfa06aaae686f2e9a6f55ebc1859e8dab3.tar.gz chromium_src-503631cfa06aaae686f2e9a6f55ebc1859e8dab3.tar.bz2 |
Create a thread-safe observer list. Will be used
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
Diffstat (limited to 'base/build')
-rw-r--r-- | base/build/base.vcproj | 4 | ||||
-rw-r--r-- | base/build/base_unittests.vcproj | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/base/build/base.vcproj b/base/build/base.vcproj index 0350c33..a1731da 100644 --- a/base/build/base.vcproj +++ b/base/build/base.vcproj @@ -502,6 +502,10 @@ > </File> <File + RelativePath="..\observer_list_threadsafe.h" + > + </File> + <File RelativePath="..\path_service.cc" > </File> diff --git a/base/build/base_unittests.vcproj b/base/build/base_unittests.vcproj index ea8cce5..94dd0b5 100644 --- a/base/build/base_unittests.vcproj +++ b/base/build/base_unittests.vcproj @@ -244,6 +244,10 @@ > </File> <File + RelativePath="..\observer_list_unittest.cc" + > + </File> + <File RelativePath="..\path_service_unittest.cc" > </File> |