Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / select_file_dialog_util.cc
blob629a7bef1ce9ae14d606a193bddbe2f0afe0237a
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 {
11 namespace util {
13 base::string16 GetSelectFileDialogTitle(
14 ui::SelectFileDialog::Type dialog_type) {
15 base::string16 title;
16 switch (dialog_type) {
17 case ui::SelectFileDialog::SELECT_NONE:
18 // Full page file manager doesn't need a title.
19 break;
21 case ui::SelectFileDialog::SELECT_FOLDER:
22 title = l10n_util::GetStringUTF16(
23 IDS_FILE_BROWSER_SELECT_FOLDER_TITLE);
24 break;
26 case ui::SelectFileDialog::SELECT_UPLOAD_FOLDER:
27 title = l10n_util::GetStringUTF16(
28 IDS_FILE_BROWSER_SELECT_UPLOAD_FOLDER_TITLE);
29 break;
31 case ui::SelectFileDialog::SELECT_SAVEAS_FILE:
32 title = l10n_util::GetStringUTF16(
33 IDS_FILE_BROWSER_SELECT_SAVEAS_FILE_TITLE);
34 break;
36 case ui::SelectFileDialog::SELECT_OPEN_FILE:
37 title = l10n_util::GetStringUTF16(
38 IDS_FILE_BROWSER_SELECT_OPEN_FILE_TITLE);
39 break;
41 case ui::SelectFileDialog::SELECT_OPEN_MULTI_FILE:
42 title = l10n_util::GetStringUTF16(
43 IDS_FILE_BROWSER_SELECT_OPEN_MULTI_FILE_TITLE);
44 break;
46 default:
47 NOTREACHED();
50 return title;
53 } // namespace util
54 } // namespace file_manager