diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 23:16:27 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 23:16:27 +0000 |
commit | b547fd44ca39e90e6416da8a5ffc040fa9d2446c (patch) | |
tree | e99a4dd4e1d05e0d8ceb2c1db2f8c45ba4b2bc2a /base/registry.cc | |
parent | b2225f18acfce00b1a8a9f25a7ad2ef8450bb6a9 (diff) | |
download | chromium_src-b547fd44ca39e90e6416da8a5ffc040fa9d2446c.zip chromium_src-b547fd44ca39e90e6416da8a5ffc040fa9d2446c.tar.gz chromium_src-b547fd44ca39e90e6416da8a5ffc040fa9d2446c.tar.bz2 |
Allow Flash (and other plugins) to be installed without restarting the browser. This works by monitoring the MozillaPlugins registry key and reloading the plugin list afterwards.
Note: I'll commit the WebKit change separately, but putting it in this change right now so everything can be reviewed together.
BUG=10574
Review URL: http://codereview.chromium.org/88020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/registry.cc')
-rw-r--r-- | base/registry.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/base/registry.cc b/base/registry.cc index b5e5b32..e5709f2 100644 --- a/base/registry.cc +++ b/base/registry.cc @@ -351,8 +351,9 @@ bool RegKey::DeleteValue(const tchar * value_name) { } bool RegKey::StartWatching() { - assert(watch_event_ == 0); - watch_event_ = CreateEvent(NULL, TRUE, FALSE, NULL); + if (!watch_event_) + watch_event_ = CreateEvent(NULL, TRUE, FALSE, NULL); + DWORD filter = REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | @@ -382,10 +383,6 @@ bool RegKey::StopWatching() { bool RegKey::HasChanged() { if (watch_event_) { if (WaitForSingleObject(watch_event_, 0) == WAIT_OBJECT_0) { - // An event only gets signaled once, then it's done, so we have - // to set up another event to watch. - CloseHandle(watch_event_); - watch_event_ = 0; StartWatching(); return true; } |