1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_manager/select_file_dialog_util.h"
7 #include "chrome/grit/generated_resources.h"
8 #include "ui/base/l10n/l10n_util.h"
10 namespace file_manager
{
13 base::string16
GetSelectFileDialogTitle(
14 ui::SelectFileDialog::Type dialog_type
) {
16 switch (dialog_type
) {
17 case ui::SelectFileDialog::SELECT_NONE
:
18 // Full page file manager doesn't need a title.
21 case ui::SelectFileDialog::SELECT_FOLDER
:
22 title
= l10n_util::GetStringUTF16(
23 IDS_FILE_BROWSER_SELECT_FOLDER_TITLE
);
26 case ui::SelectFileDialog::SELECT_UPLOAD_FOLDER
:
27 title
= l10n_util::GetStringUTF16(
28 IDS_FILE_BROWSER_SELECT_UPLOAD_FOLDER_TITLE
);
31 case ui::SelectFileDialog::SELECT_SAVEAS_FILE
:
32 title
= l10n_util::GetStringUTF16(
33 IDS_FILE_BROWSER_SELECT_SAVEAS_FILE_TITLE
);
36 case ui::SelectFileDialog::SELECT_OPEN_FILE
:
37 title
= l10n_util::GetStringUTF16(
38 IDS_FILE_BROWSER_SELECT_OPEN_FILE_TITLE
);
41 case ui::SelectFileDialog::SELECT_OPEN_MULTI_FILE
:
42 title
= l10n_util::GetStringUTF16(
43 IDS_FILE_BROWSER_SELECT_OPEN_MULTI_FILE_TITLE
);
54 } // namespace file_manager