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

Unified Diff: content/browser/plugin_data_remover_impl_browsertest.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_data_remover_impl_browsertest.cc
diff --git a/content/browser/plugin_data_remover_impl_browsertest.cc b/content/browser/plugin_data_remover_impl_browsertest.cc
index 101987d1527da94f47c8f18b6db307b2d1965fa3..98b06d78e176d48e006e2d8a3a26bf171827abb8 100644
--- a/content/browser/plugin_data_remover_impl_browsertest.cc
+++ b/content/browser/plugin_data_remover_impl_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/base_paths.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/path_service.h"
#include "base/synchronization/waitable_event_watcher.h"
@@ -19,12 +20,11 @@ namespace {
const char* kNPAPITestPluginMimeType = "application/vnd.npapi-test";
}
-class PluginDataRemoverTest : public ContentBrowserTest,
- public base::WaitableEventWatcher::Delegate {
+class PluginDataRemoverTest : public ContentBrowserTest {
public:
PluginDataRemoverTest() {}
- virtual void OnWaitableEventSignaled(base::WaitableEvent* waitable_event) {
+ void OnWaitableEventSignaled(base::WaitableEvent* waitable_event) {
MessageLoop::current()->Quit();
}
@@ -51,7 +51,9 @@ IN_PROC_BROWSER_TEST_F(PluginDataRemoverTest, RemoveData) {
base::WaitableEventWatcher watcher;
base::WaitableEvent* event =
plugin_data_remover.StartRemoving(base::Time());
- watcher.StartWatching(event, this);
+ watcher.StartWatching(
+ event,
+ base::Bind(&PluginDataRemoverTest::OnWaitableEventSignaled, this));
RunMessageLoop();
}

Powered by Google App Engine
This is Rietveld 408576698