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

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

Issue 8343023: rename Run in MessageLoopForUI to RunWithDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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/simple_message_box_views.cc ('k') | chrome/test/base/ui_test_utils.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) 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/logging.h" 5 #include "base/logging.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/ui/views/user_data_dir_dialog.h" 7 #include "chrome/browser/ui/views/user_data_dir_dialog.h"
8 #include "grit/chromium_strings.h" 8 #include "grit/chromium_strings.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/base/message_box_flags.h" 11 #include "ui/base/message_box_flags.h"
12 #include "views/controls/message_box_view.h" 12 #include "views/controls/message_box_view.h"
13 #include "views/widget/widget.h" 13 #include "views/widget/widget.h"
14 14
15 // static 15 // static
16 FilePath UserDataDirDialog::RunUserDataDirDialog( 16 FilePath UserDataDirDialog::RunUserDataDirDialog(
17 const FilePath& user_data_dir) { 17 const FilePath& user_data_dir) {
18 // When the window closes, it will delete itself. 18 // When the window closes, it will delete itself.
19 UserDataDirDialog* dlg = new UserDataDirDialog(user_data_dir); 19 UserDataDirDialog* dlg = new UserDataDirDialog(user_data_dir);
20 MessageLoopForUI::current()->Run(dlg); 20 MessageLoopForUI::current()->RunWithDispatcher(dlg);
21 return dlg->user_data_dir(); 21 return dlg->user_data_dir();
22 } 22 }
23 23
24 UserDataDirDialog::UserDataDirDialog(const FilePath& user_data_dir) 24 UserDataDirDialog::UserDataDirDialog(const FilePath& user_data_dir)
25 : ALLOW_THIS_IN_INITIALIZER_LIST( 25 : ALLOW_THIS_IN_INITIALIZER_LIST(
26 select_file_dialog_(SelectFileDialog::Create(this))), 26 select_file_dialog_(SelectFileDialog::Create(this))),
27 is_blocking_(true) { 27 is_blocking_(true) {
28 string16 message_text = l10n_util::GetStringFUTF16( 28 string16 message_text = l10n_util::GetStringFUTF16(
29 IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, 29 IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY,
30 user_data_dir.LossyDisplayName()); 30 user_data_dir.LossyDisplayName());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 void UserDataDirDialog::FileSelected(const FilePath& path, 103 void UserDataDirDialog::FileSelected(const FilePath& path,
104 int index, void* params) { 104 int index, void* params) {
105 user_data_dir_ = path; 105 user_data_dir_ = path;
106 is_blocking_ = false; 106 is_blocking_ = false;
107 } 107 }
108 108
109 void UserDataDirDialog::FileSelectionCanceled(void* params) { 109 void UserDataDirDialog::FileSelectionCanceled(void* params) {
110 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698