Commit ea955df4 authored by Daniel Park's avatar Daniel Park Committed by Commit Bot

[NTP Button] Replaces 'home' text with 'startup'

Bug: 843639
Change-Id: I71a393ecf295958a14e5bbae4ca52025b3c153a5
Reviewed-on: https://chromium-review.googlesource.com/1064555
Commit-Queue: Daniel Park <danielpark@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560289}
parent 3d161a17
......@@ -16,6 +16,7 @@ import android.widget.EditText;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.components.url_formatter.UrlFormatter;
/**
......@@ -32,7 +33,11 @@ public class HomepageEditor extends Fragment implements TextWatcher {
Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mHomepageManager = HomepageManager.getInstance();
getActivity().setTitle(R.string.options_homepage_edit_title);
if (FeatureUtilities.isNewTabPageButtonEnabled()) {
getActivity().setTitle(R.string.options_startup_page_edit_title);
} else {
getActivity().setTitle(R.string.options_homepage_edit_title);
}
View v = inflater.inflate(R.layout.homepage_editor, container, false);
mHomepageUrlEdit = (EditText) v.findViewById(R.id.homepage_url_edit);
......
......@@ -11,6 +11,7 @@ import android.preference.PreferenceFragment;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
import org.chromium.chrome.browser.util.FeatureUtilities;
/**
* Fragment that allows the user to configure homepage related preferences.
......@@ -27,7 +28,12 @@ public class HomepagePreferences extends PreferenceFragment {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mHomepageManager = HomepageManager.getInstance();
getActivity().setTitle(R.string.options_homepage_title);
if (FeatureUtilities.isNewTabPageButtonEnabled()) {
getActivity().setTitle(R.string.options_startup_page_title);
} else {
getActivity().setTitle(R.string.options_homepage_title);
}
PreferenceUtils.addPreferencesFromResource(this, R.xml.homepage_preferences);
mHomepageSwitch = (ChromeSwitchPreference) findPreference(PREF_HOMEPAGE_SWITCH);
......
......@@ -173,6 +173,9 @@ public class MainPreferences extends PreferenceFragment
if (HomepageManager.shouldShowHomepageSetting()) {
Preference homepagePref = addPreferenceIfAbsent(PREF_HOMEPAGE);
if (FeatureUtilities.isNewTabPageButtonEnabled()) {
homepagePref.setTitle(R.string.options_startup_page_title);
}
setOnOffSummary(homepagePref, HomepageManager.getInstance().getPrefHomepageEnabled());
} else {
removePreferenceIfPresent(PREF_HOMEPAGE);
......
......@@ -550,6 +550,14 @@ CHAR-LIMIT guidelines:
Open this page
</message>
<!-- Startup page preferences -->
<message name="IDS_OPTIONS_STARTUP_PAGE_TITLE" desc="The title of the setting that allows users to manage the page that opens when they start Chrome.">
Startup Page
</message>
<message name="IDS_OPTIONS_STARTUP_PAGE_EDIT_TITLE" desc="The title of the screen that allows users to change the URL of the page that opens when they start Chrome.">
Edit startup page
</message>
<!-- Notifications preferences -->
<message name="IDS_PREFS_NOTIFICATIONS" desc="Title for Notification preferences.">
Notifications
......
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