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

Unified Diff: components/autofill/browser/personal_data_manager_unittest.cc

Issue 12847010: Fix leaks introduced by WDS change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « chrome/browser/signin/token_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/personal_data_manager_unittest.cc
diff --git a/components/autofill/browser/personal_data_manager_unittest.cc b/components/autofill/browser/personal_data_manager_unittest.cc
index be28dc545ae864d0ae8f0d6a2270544e6e3e673a..ff1435e9a856e6f1673ff2e23ffcbcb599e52f60 100644
--- a/components/autofill/browser/personal_data_manager_unittest.cc
+++ b/components/autofill/browser/personal_data_manager_unittest.cc
@@ -8,6 +8,7 @@
#include "base/guid.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/encryptor.h"
#include "chrome/browser/webdata/web_data_service.h"
@@ -78,10 +79,13 @@ class PersonalDataManagerTest : public testing::Test {
// Destruction order is imposed explicitly here.
personal_data_.reset(NULL);
profile_.reset(NULL);
-
- db_thread_.Stop();
+ base::WaitableEvent done(false, false);
Jói 2013/03/20 16:18:42 Is the point of these 4 lines just to make sure to
Cait (Slow) 2013/03/20 16:49:02 Done.
+ BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
+ base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done)));
+ done.Wait();
MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
MessageLoop::current()->Run();
+ db_thread_.Stop();
}
void ResetPersonalDataManager() {
« no previous file with comments | « chrome/browser/signin/token_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698