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

Side by Side Diff: chrome/browser/ui/views/user_data_dir_dialog_view.cc

Issue 141683005: Removes MessageLoop::Type checks in favor of IsCurrent on MessageLoops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | chrome/test/chromedriver/chrome/adb_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/user_data_dir_dialog_view.h" 5 #include "chrome/browser/ui/views/user_data_dir_dialog_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/ui/chrome_select_file_policy.h" 9 #include "chrome/browser/ui/chrome_select_file_policy.h"
10 #include "chrome/browser/ui/user_data_dir_dialog.h" 10 #include "chrome/browser/ui/user_data_dir_dialog.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 user_data_dir_ = path; 96 user_data_dir_ = path;
97 is_blocking_ = false; 97 is_blocking_ = false;
98 } 98 }
99 99
100 void UserDataDirDialogView::FileSelectionCanceled(void* params) { 100 void UserDataDirDialogView::FileSelectionCanceled(void* params) {
101 } 101 }
102 102
103 namespace chrome { 103 namespace chrome {
104 104
105 base::FilePath ShowUserDataDirDialog(const base::FilePath& user_data_dir) { 105 base::FilePath ShowUserDataDirDialog(const base::FilePath& user_data_dir) {
106 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); 106 DCHECK(base::MessageLoopForUI::IsCurrent());
107 // When the window closes, it will delete itself. 107 // When the window closes, it will delete itself.
108 UserDataDirDialogView* dialog = new UserDataDirDialogView(user_data_dir); 108 UserDataDirDialogView* dialog = new UserDataDirDialogView(user_data_dir);
109 views::DialogDelegate::CreateDialogWidget(dialog, NULL, NULL)->Show(); 109 views::DialogDelegate::CreateDialogWidget(dialog, NULL, NULL)->Show();
110 base::RunLoop run_loop(dialog); 110 base::RunLoop run_loop(dialog);
111 run_loop.Run(); 111 run_loop.Run();
112 return dialog->user_data_dir(); 112 return dialog->user_data_dir();
113 } 113 }
114 114
115 } // namespace chrome 115 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | chrome/test/chromedriver/chrome/adb_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698