Commit 767df5f5 authored by Sky Malice's avatar Sky Malice Committed by Commit Bot

[Feed] Pass KnownContentApi to FeedOfflineBridge.

Bug: 866123
Change-Id: I3278d84df9a23f85452c30f2edb68313c197a0a7
Reviewed-on: https://chromium-review.googlesource.com/1222351
Commit-Queue: Sky Malice <skym@chromium.org>
Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Reviewed-by: default avatarGang Wu <gangwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591358}
parent 7a6cd327
......@@ -44,8 +44,7 @@ public class FeedOfflineBridge
public FeedOfflineBridge(Profile profile, KnownContentApi knownContentApi) {
mNativeBridge = nativeInit(profile);
mKnownContentApi = knownContentApi;
// TODO(skym): Remove this null check when a KnownContentApi is provided by Feed.
if (mKnownContentApi != null) mKnownContentApi.addListener(this);
mKnownContentApi.addListener(this);
}
@Override
......@@ -53,8 +52,7 @@ public class FeedOfflineBridge
assert mNativeBridge != 0;
nativeDestroy(mNativeBridge);
mNativeBridge = 0;
// TODO(skym): Remove this null check when a KnownContentApi is provided by Feed.
if (mKnownContentApi != null) mKnownContentApi.removeListener(this);
mKnownContentApi.removeListener(this);
}
@Override
......
......@@ -68,8 +68,8 @@ public class FeedProcessScopeFactory {
schedulerBridge.initializeFeedDependencies(
sFeedProcessScope.getRequestManager(), sFeedProcessScope.getSessionManager());
// TODO(skym): Use sFeedProcessScope.getKnownContentApi().
sFeedOfflineIndicator = new FeedOfflineBridge(profile, null);
sFeedOfflineIndicator =
new FeedOfflineBridge(profile, sFeedProcessScope.getKnownContentApi());
}
private static Configuration createConfiguration() {
......
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