Skip to content

Commit

Permalink
Feed: Fix build errors under enable_feed_in_chrome = false
Browse files Browse the repository at this point in the history
Currently, if disabling the feed feature with GN build flag, a lot of
build errors occur. It is because that the dummy implementation wasn't
updated with the latest changes (e.g. VisibleForTesting).

Bug: none
Change-Id: Ib780d4457d03427e78e6fe47d7872e77153a3f0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081712
Reviewed-by: Dan H <harringtond@chromium.org>
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Jinho Bang <jinho.bang@samsung.com>
Cr-Commit-Position: refs/heads/master@{#746208}
  • Loading branch information
romandev authored and Commit Bot committed Mar 3, 2020
1 parent b5235c5 commit 853fcc6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package org.chromium.chrome.features.start_surface;

import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;

import org.chromium.chrome.browser.ChromeActivity;
Expand All @@ -15,7 +13,7 @@
/** The dummy coordinator when feed is not enabled ('src/components/feed/features.gni'). */
class ExploreSurfaceCoordinator {
ExploreSurfaceCoordinator(ChromeActivity activity, ViewGroup parentView,
@Nullable View headerView, PropertyModel containerPropertyModel) {}
PropertyModel containerPropertyModel, boolean hasHeader) {}

/**
* Gets the {@link FeedSurfaceCreator}.
Expand All @@ -29,8 +27,9 @@ FeedSurfaceCreator getFeedSurfaceCreator() {
interface FeedSurfaceCreator {
/**
* Creates the {@link FeedSurfaceCoordinator} for the specified mode.
* @param isInNightMode Whether or not the feed surface is going to display in night mode.
* @return The {@link FeedSurfaceCoordinator}.
*/
FeedSurfaceCoordinator createFeedSurfaceCoordinator();
FeedSurfaceCoordinator createFeedSurfaceCoordinator(boolean isInNightMode);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@

package org.chromium.chrome.browser.feed;

import org.chromium.base.VisibleForTesting;
import androidx.annotation.VisibleForTesting;

import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
import org.chromium.chrome.browser.native_page.NativePageHost;
import org.chromium.chrome.browser.ntp.NewTabPage;
import org.chromium.chrome.browser.tab.TabImpl;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.ui.native_page.NativePageHost;

/**
* Provides a new tab page that displays an interest feed rendered list of content suggestions.
*/
public class FeedNewTabPage extends NewTabPage {
/**
* Constructs a new FeedNewTabPage.
* Constructs a new {@link FeedNewTabPage}.
*
* @param activity The containing {@link ChromeActivity}.
* @param nativePageHost The host for this native page.
* @param tabModelSelector The {@link TabModelSelector} for the containing activity.
* @param activityTabProvider Allows us to check if we are the current tab.
* @param activityLifecycleDispatcher Allows us to subscribe to backgrounding events.
* @param tab The {@link TabImpl} that contains this new tab page.
*/
public FeedNewTabPage(ChromeActivity activity, NativePageHost nativePageHost,
TabModelSelector tabModelSelector, ActivityTabProvider activityTabProvider,
ActivityLifecycleDispatcher activityLifecycleDispatcher) {
ActivityLifecycleDispatcher activityLifecycleDispatcher, TabImpl tab) {
super(activity, nativePageHost, tabModelSelector, activityTabProvider,
activityLifecycleDispatcher);
activityLifecycleDispatcher, tab);
}

@VisibleForTesting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import android.content.Context;

import org.chromium.chrome.browser.background_task_scheduler.NativeBackgroundTask;
import org.chromium.components.background_task_scheduler.NativeBackgroundTask;
import org.chromium.components.background_task_scheduler.TaskParameters;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package org.chromium.chrome.browser.feed;

import org.chromium.base.VisibleForTesting;
import androidx.annotation.VisibleForTesting;

/**
* A network client that returns configurable responses
Expand Down

0 comments on commit 853fcc6

Please sign in to comment.