Commit 9b19a2f9 authored by Weilun Shi's avatar Weilun Shi Committed by Commit Bot

[NTP] Change upload image format and change description

Enable the .png image upload by default. Change the options drop down
menu to only have one option with hardcoded string "*.jpeg, *.jpg,
*png".

Screenshot:
https://screenshot.googleplex.com/1sd8JoBoM14.png
https://screenshot.googleplex.com/5mnsxOtRxJD.png

Bug: 864303
Change-Id: I3b041d0f4e08898fa0c6998742a8ce04065ab5ac
Reviewed-on: https://chromium-review.googlesource.com/1166027
Commit-Queue: Weilun Shi <sweilun@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581360}
parent f0240698
...@@ -4705,6 +4705,9 @@ Keep your key file in a safe place. You will need it to create new versions of y ...@@ -4705,6 +4705,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_NTP_CUSTOM_LINKS_EDIT_SHORTCUT" desc="The title for custom link edit shortcut dialog. (On the New Tab Page)"> <message name="IDS_NTP_CUSTOM_LINKS_EDIT_SHORTCUT" desc="The title for custom link edit shortcut dialog. (On the New Tab Page)">
Edit shortcut Edit shortcut
</message> </message>
<message name="IDS_UPLOAD_IMAGE_FORMAT" desc="The permitted upload image format for the custom background. (On the New Tab Page)">
*.jpeg, *.jpg, *.png
</message>
<message name="IDS_NTP_CUSTOM_LINKS_NAME" desc="The title for custom link name input field on the edit shortcut dialog. (On the New Tab Page)"> <message name="IDS_NTP_CUSTOM_LINKS_NAME" desc="The title for custom link name input field on the edit shortcut dialog. (On the New Tab Page)">
Name Name
</message> </message>
......
...@@ -440,10 +440,12 @@ void SearchTabHelper::OnSelectLocalBackgroundImage() { ...@@ -440,10 +440,12 @@ void SearchTabHelper::OnSelectLocalBackgroundImage() {
ui::SelectFileDialog::FileTypeInfo file_types; ui::SelectFileDialog::FileTypeInfo file_types;
file_types.allowed_paths = ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH; file_types.allowed_paths = ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH;
file_types.extensions.resize(2); file_types.extensions.resize(1);
file_types.extensions[0].push_back(FILE_PATH_LITERAL("jpg")); file_types.extensions[0].push_back(FILE_PATH_LITERAL("jpg"));
file_types.extensions[0].push_back(FILE_PATH_LITERAL("jpeg")); file_types.extensions[0].push_back(FILE_PATH_LITERAL("jpeg"));
file_types.extensions[1].push_back(FILE_PATH_LITERAL("png")); file_types.extensions[0].push_back(FILE_PATH_LITERAL("png"));
file_types.extension_description_overrides.push_back(
l10n_util::GetStringUTF16(IDS_UPLOAD_IMAGE_FORMAT));
select_file_dialog_->SelectFile( select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(), directory, ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(), directory,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment