Index: chrome/browser/password_manager/password_store_default_unittest.cc |
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc |
index 006cb70ba01a6ef507c22872bedd61f3cf1e80bb..d818d943d936b8637455148cb24f40f134707860 100644 |
--- a/chrome/browser/password_manager/password_store_default_unittest.cc |
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc |
@@ -3,11 +3,12 @@ |
// found in the LICENSE file. |
#include "base/basictypes.h" |
+#include "base/bind.h" |
+#include "base/bind_helpers.h" |
#include "base/scoped_temp_dir.h" |
#include "base/stl_util.h" |
#include "base/string_util.h" |
#include "base/synchronization/waitable_event.h" |
-#include "base/test/signaling_task.h" |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/password_manager/password_form_data.h" |
@@ -191,7 +192,7 @@ TEST_F(PasswordStoreDefaultTest, NonASCIIData) { |
// yet another task to notify us that it's safe to carry on with the test. |
WaitableEvent done(false, false); |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
MockPasswordStoreConsumer consumer; |
@@ -286,7 +287,7 @@ TEST_F(PasswordStoreDefaultTest, Migration) { |
// task to notify us that it's safe to carry on with the test. |
WaitableEvent done(false, false); |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
// Initializing the PasswordStore should trigger a migration. |
@@ -302,7 +303,7 @@ TEST_F(PasswordStoreDefaultTest, Migration) { |
// Again, the WDS schedules tasks to run on the DB thread, so schedule a task |
// to signal us when it is safe to continue. |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
// Let the WDS callbacks proceed so the logins can be migrated. |
@@ -347,7 +348,7 @@ TEST_F(PasswordStoreDefaultTest, Migration) { |
// Wait for the WDS methods to execute on the DB thread. |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
// Handle the callback from the WDS. |
@@ -361,7 +362,7 @@ TEST_F(PasswordStoreDefaultTest, Migration) { |
// Wait for the WDS methods to execute on the DB thread. |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
// Handle the callback from the WDS. |
@@ -399,7 +400,7 @@ TEST_F(PasswordStoreDefaultTest, MigrationAlreadyDone) { |
// task to notify us that it's safe to carry on with the test. |
WaitableEvent done(false, false); |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
// Pretend that the migration has already taken place. |
@@ -479,7 +480,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) { |
// yet another task to notify us that it's safe to carry on with the test. |
WaitableEvent done(false, false); |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
// Change the password. |
@@ -501,7 +502,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) { |
// Wait for PasswordStore to send the notification. |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
const PasswordStoreChange expected_delete_changes[] = { |
@@ -520,7 +521,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) { |
// Wait for PasswordStore to send the notification. |
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
- new base::SignalingTask(&done)); |
+ base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); |
done.Wait(); |
store->Shutdown(); |