Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1685)

Unified Diff: base/registry.cc

Issue 88020: Allow Flash (and other plugins) to be installed without restarting the browse... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/registry.h ('k') | chrome/browser/plugin_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/registry.cc
===================================================================
--- base/registry.cc (revision 14070)
+++ base/registry.cc (working copy)
@@ -351,8 +351,9 @@
}
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::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;
}
« no previous file with comments | « base/registry.h ('k') | chrome/browser/plugin_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698