diff options
author | jyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 04:32:09 +0000 |
---|---|---|
committer | jyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 04:32:09 +0000 |
commit | 89c44672eed86df10eccc68b32fecd0df2a6e1bf (patch) | |
tree | 26d701803eed5b18f125bb21c94911797870380e /extensions/common | |
parent | fbed2efad6d19ff61ce5495fd71560a1c8c2281a (diff) | |
download | chromium_src-89c44672eed86df10eccc68b32fecd0df2a6e1bf.zip chromium_src-89c44672eed86df10eccc68b32fecd0df2a6e1bf.tar.gz chromium_src-89c44672eed86df10eccc68b32fecd0df2a6e1bf.tar.bz2 |
Replace the RulesRegistryWithCache 'ready' system with a OneShotEvent.
Review URL: https://chromiumcodereview.appspot.com/15329008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common')
-rw-r--r-- | extensions/common/one_shot_event.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extensions/common/one_shot_event.cc b/extensions/common/one_shot_event.cc index 14ab4ed..e654e3e 100644 --- a/extensions/common/one_shot_event.cc +++ b/extensions/common/one_shot_event.cc @@ -26,7 +26,11 @@ struct OneShotEvent::TaskInfo { base::Closure task; }; -OneShotEvent::OneShotEvent() : signaled_(false) {} +OneShotEvent::OneShotEvent() : signaled_(false) { + // It's acceptable to construct the OneShotEvent on one thread, but + // immediately move it to another thread. + thread_checker_.DetachFromThread(); +} OneShotEvent::~OneShotEvent() {} void OneShotEvent::Post(const tracked_objects::Location& from_here, |