| Index: chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileGroup.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileGroup.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileGroup.java
|
| index 8c8b0781bf7f419e41360e766c8f3d4581086b7d..3d711fe50adbf8b9042ebc56c0e250d9cf4acdb3 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileGroup.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileGroup.java
|
| @@ -23,6 +23,7 @@
|
|
|
| import org.chromium.base.ApiCompatibilityUtils;
|
| import org.chromium.base.Log;
|
| +import org.chromium.base.VisibleForTesting;
|
| import org.chromium.chrome.R;
|
| import org.chromium.chrome.browser.ChromeFeatureList;
|
| import org.chromium.chrome.browser.favicon.LargeIconBridge.LargeIconCallback;
|
| @@ -261,8 +262,7 @@ public void renderTileViews(
|
| for (Tile tile : mTiles) {
|
| TileView tileView = oldTileViews.get(tile.getUrl());
|
| if (tileView == null) {
|
| - tileView = buildTileView(
|
| - tile, tileGridLayout, trackLoadTasks, mTitleLinesCount, condensed);
|
| + tileView = buildTileView(tile, tileGridLayout, trackLoadTasks, condensed);
|
| } else {
|
| tileView.updateIfDataChanged(tile);
|
| }
|
| @@ -284,15 +284,15 @@ public boolean hasReceivedData() {
|
| * @param tile The tile that holds the data to populate the new tile view.
|
| * @param parentView The parent of the new tile view.
|
| * @param trackLoadTask Whether to track a load task.
|
| - * @param titleLines The number of text lines to use for each tile title.
|
| * @param condensed Whether to use a condensed layout.
|
| * @return The new tile view.
|
| */
|
| - private TileView buildTileView(Tile tile, ViewGroup parentView, boolean trackLoadTask,
|
| - int titleLines, boolean condensed) {
|
| + @VisibleForTesting
|
| + TileView buildTileView(
|
| + Tile tile, ViewGroup parentView, boolean trackLoadTask, boolean condensed) {
|
| TileView tileView = (TileView) LayoutInflater.from(parentView.getContext())
|
| .inflate(R.layout.tile_view, parentView, false);
|
| - tileView.initialize(tile, titleLines, condensed);
|
| + tileView.initialize(tile, mTitleLinesCount, condensed);
|
|
|
| // Note: It is important that the callbacks below don't keep a reference to the tile or
|
| // modify them as there is no guarantee that the same tile would be used to update the view.
|
|
|