diff options
author | jam <jam@chromium.org> | 2015-09-28 19:26:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-29 02:27:37 +0000 |
commit | 7fab108c80ea62d1c0c3502345e70db75973a4bb (patch) | |
tree | 862a315f394891cfe5cbab8e85b53d43cc7a5165 /base/win/registry.cc | |
parent | e4da87517db5b2dab98207f7c4b3049a6b7e44a8 (diff) | |
download | chromium_src-7fab108c80ea62d1c0c3502345e70db75973a4bb.zip chromium_src-7fab108c80ea62d1c0c3502345e70db75973a4bb.tar.gz chromium_src-7fab108c80ea62d1c0c3502345e70db75973a4bb.tar.bz2 |
Extend base::win::ObjectWatcher to watch an event multiple times.
This is split off from https://codereview.chromium.org/1350023003/. During performance testing, it was found that it was 5x faster to watch an auto-reset event once instead of a manual-reset event every time it fired.
BUG=478251
Review URL: https://codereview.chromium.org/1366093006
Cr-Commit-Position: refs/heads/master@{#351240}
Diffstat (limited to 'base/win/registry.cc')
-rw-r--r-- | base/win/registry.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/win/registry.cc b/base/win/registry.cc index 47afcbf..28e0461 100644 --- a/base/win/registry.cc +++ b/base/win/registry.cc @@ -82,7 +82,7 @@ bool RegKey::Watcher::StartWatching(HKEY key, const ChangeCallback& callback) { } callback_ = callback; - return object_watcher_.StartWatching(watch_event_.Get(), this); + return object_watcher_.StartWatchingOnce(watch_event_.Get(), this); } // RegKey ---------------------------------------------------------------------- |