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

Side by Side Diff: chrome/browser/password_manager/password_store_default_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 login_db_.reset(new LoginDatabase()); 117 login_db_.reset(new LoginDatabase());
118 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( 118 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append(
119 FILE_PATH_LITERAL("login_test")))); 119 FILE_PATH_LITERAL("login_test"))));
120 120
121 wds_ = new WebDataService(); 121 wds_ = new WebDataService();
122 ASSERT_TRUE(wds_->Init(temp_dir_.path())); 122 ASSERT_TRUE(wds_->Init(temp_dir_.path()));
123 } 123 }
124 124
125 virtual void TearDown() { 125 virtual void TearDown() {
126 wds_->Shutdown(); 126 wds_->Shutdown();
127 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); 127 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
128 MessageLoop::current()->Run(); 128 MessageLoop::current()->Run();
129 db_thread_.Stop(); 129 db_thread_.Stop();
130 } 130 }
131 131
132 MessageLoopForUI message_loop_; 132 MessageLoopForUI message_loop_;
133 content::TestBrowserThread ui_thread_; 133 content::TestBrowserThread ui_thread_;
134 // PasswordStore, WDS schedule work on this thread. 134 // PasswordStore, WDS schedule work on this thread.
135 content::TestBrowserThread db_thread_; 135 content::TestBrowserThread db_thread_;
136 136
137 scoped_ptr<LoginDatabase> login_db_; 137 scoped_ptr<LoginDatabase> login_db_;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // Deleting the login should trigger a notification. 519 // Deleting the login should trigger a notification.
520 store->RemoveLogin(*form); 520 store->RemoveLogin(*form);
521 521
522 // Wait for PasswordStore to send the notification. 522 // Wait for PasswordStore to send the notification.
523 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 523 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
524 base::Bind(&WaitableEvent::Signal, base::Unretained(&done))); 524 base::Bind(&WaitableEvent::Signal, base::Unretained(&done)));
525 done.Wait(); 525 done.Wait();
526 526
527 store->Shutdown(); 527 store->Shutdown();
528 } 528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698