OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_ |
7 | 7 |
| 8 #include "base/callback.h" |
| 9 |
8 namespace base { | 10 namespace base { |
9 class FilePath; | 11 class FilePath; |
10 } | 12 } |
11 | 13 |
12 namespace chrome { | 14 namespace chrome { |
13 | 15 |
14 // Shows a user data directory picker dialog. The method blocks while the dialog | 16 // Shows a user data directory picker dialog. The method blocks while the dialog |
15 // is showing. If the user picks a directory, this method returns the chosen | 17 // is showing. If the user picks a directory, this method returns the chosen |
16 // directory. |user_data_dir| is the value of the directory we were not able to | 18 // directory. |user_data_dir| is the value of the directory we were not able to |
17 // use. | 19 // use. |
18 base::FilePath ShowUserDataDirDialog(const base::FilePath& user_data_dir); | 20 base::FilePath ShowUserDataDirDialog(const base::FilePath& user_data_dir); |
19 | 21 |
| 22 // Tests can call this to install a custom callback to be called instead of |
| 23 // actually showing the dialog when ShowUserDataDirDialog() is invoked. |
| 24 void InstallCustomShowUserDataDirDialogCallbackForTest( |
| 25 const base::Closure& callback); |
| 26 |
20 } // namespace chrome | 27 } // namespace chrome |
21 | 28 |
22 #endif // CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_ | 29 #endif // CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_ |
OLD | NEW |