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

Unified Diff: chrome/browser/ui/views/user_data_dir_dialog_view.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: phajdan feedback Created 8 years, 6 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/ui/views/uninstall_view.cc ('k') | chrome/test/base/bookmark_load_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/user_data_dir_dialog_view.cc
diff --git a/chrome/browser/ui/views/user_data_dir_dialog_view.cc b/chrome/browser/ui/views/user_data_dir_dialog_view.cc
index a0e7128c1631df721d22318985a71558a42aa851..2a1f29c51747d9cebb78d213411bf37ee123e7f0 100644
--- a/chrome/browser/ui/views/user_data_dir_dialog_view.cc
+++ b/chrome/browser/ui/views/user_data_dir_dialog_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/user_data_dir_dialog_view.h"
#include "base/logging.h"
+#include "base/run_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/user_data_dir_dialog.h"
#include "grit/chromium_strings.h"
@@ -100,10 +101,12 @@ void UserDataDirDialogView::FileSelectionCanceled(void* params) {
namespace browser {
FilePath ShowUserDataDirDialog(const FilePath& user_data_dir) {
+ DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
// When the window closes, it will delete itself.
UserDataDirDialogView* dialog = new UserDataDirDialogView(user_data_dir);
views::Widget::CreateWindow(dialog)->Show();
- MessageLoopForUI::current()->RunWithDispatcher(dialog);
+ base::RunLoop run_loop(dialog);
+ run_loop.Run();
return dialog->user_data_dir();
}
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | chrome/test/base/bookmark_load_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698