| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java
|
| index 412d31a9fbb5fcc7a7f9c43dbdc3a53f97a6bf6b..7de8b28864c3c963119c20bdb8c24c527b79f808 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java
|
| @@ -14,6 +14,7 @@ import android.widget.TextView;
|
| import org.chromium.base.ApiCompatibilityUtils;
|
| import org.chromium.base.VisibleForTesting;
|
| import org.chromium.chrome.R;
|
| +import org.chromium.chrome.browser.ChromeFeatureList;
|
| import org.chromium.chrome.browser.NativePage;
|
| import org.chromium.chrome.browser.UrlConstants;
|
| import org.chromium.chrome.browser.compositor.layouts.content.InvalidationAwareThumbnailProvider;
|
| @@ -63,14 +64,22 @@ public class IncognitoNewTabPage implements NativePage, InvalidationAwareThumbna
|
| R.color.incognito_primary_color);
|
|
|
| LayoutInflater inflater = LayoutInflater.from(activity);
|
| - mIncognitoNewTabPageView =
|
| - (IncognitoNewTabPageView) inflater.inflate(R.layout.new_tab_page_incognito, null);
|
| + mIncognitoNewTabPageView = (IncognitoNewTabPageView) inflater.inflate(useMDIncognitoNTP()
|
| + ? R.layout.new_tab_page_incognito_md
|
| + : R.layout.new_tab_page_incognito,
|
| + null);
|
| mIncognitoNewTabPageView.initialize(mIncognitoNewTabPageManager);
|
|
|
| - TextView newTabIncognitoMessage = (TextView) mIncognitoNewTabPageView.findViewById(
|
| - R.id.new_tab_incognito_message);
|
| - newTabIncognitoMessage.setText(
|
| - activity.getResources().getString(R.string.new_tab_incognito_message));
|
| + if (!useMDIncognitoNTP()) {
|
| + TextView newTabIncognitoMessage = (TextView) mIncognitoNewTabPageView.findViewById(
|
| + R.id.new_tab_incognito_message);
|
| + newTabIncognitoMessage.setText(
|
| + activity.getResources().getString(R.string.new_tab_incognito_message));
|
| + }
|
| + }
|
| +
|
| + private static boolean useMDIncognitoNTP() {
|
| + return ChromeFeatureList.isEnabled(ChromeFeatureList.MATERIAL_DESIGN_INCOGNITO_NTP);
|
| }
|
|
|
| /**
|
|
|