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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 12094106: Refactor: Simplify WaitableEventWatcher. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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
Index: content/browser/plugin_service_impl.cc
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 2cd2eb16f94dd83f7952e49e1f4fe5ec459f2db5..5b11e05aa6c1a603d62813536252a2d2576336b6 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -169,7 +169,10 @@ void PluginServiceImpl::StartWatchingPlugins() {
KEY_NOTIFY) == ERROR_SUCCESS) {
if (hkcu_key_.StartWatching() == ERROR_SUCCESS) {
hkcu_event_.reset(new base::WaitableEvent(hkcu_key_.watch_event()));
- hkcu_watcher_.StartWatching(hkcu_event_.get(), this);
+ base::WaitableEventWatcher::EventCallback callback =
+ base::Bind(&PluginServiceImpl::OnWaitableEventSignaled,
+ base::Unretained(this));
+ hkcu_watcher_.StartWatching(hkcu_event_.get(), callback);
}
}
if (hklm_key_.Create(HKEY_LOCAL_MACHINE,
@@ -177,7 +180,10 @@ void PluginServiceImpl::StartWatchingPlugins() {
KEY_NOTIFY) == ERROR_SUCCESS) {
if (hklm_key_.StartWatching() == ERROR_SUCCESS) {
hklm_event_.reset(new base::WaitableEvent(hklm_key_.watch_event()));
- hklm_watcher_.StartWatching(hklm_event_.get(), this);
+ base::WaitableEventWatcher::EventCallback callback =
+ base::Bind(&PluginServiceImpl::OnWaitableEventSignaled,
+ base::Unretained(this));
+ hklm_watcher_.StartWatching(hklm_event_.get(), callback);
}
}
#endif

Powered by Google App Engine
This is Rietveld 408576698