Commit 6a77b1b5 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

Disable suggested pages on notifications

This CL disables notifications suggested pages for all kinds of contents
: offline pages and content indexing.

Bug: 1011415
Change-Id: I4555f6f189cbc763379a52d7b163464ff6d8c8c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853111Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704744}
parent 99367a66
...@@ -10,7 +10,6 @@ import org.chromium.chrome.browser.download.DownloadNotifier; ...@@ -10,7 +10,6 @@ import org.chromium.chrome.browser.download.DownloadNotifier;
import org.chromium.chrome.browser.download.DownloadServiceDelegate; import org.chromium.chrome.browser.download.DownloadServiceDelegate;
import org.chromium.components.offline_items_collection.ContentId; import org.chromium.components.offline_items_collection.ContentId;
import org.chromium.components.offline_items_collection.LaunchLocation; import org.chromium.components.offline_items_collection.LaunchLocation;
import org.chromium.components.offline_items_collection.LegacyHelpers;
import org.chromium.components.offline_items_collection.OfflineContentProvider; import org.chromium.components.offline_items_collection.OfflineContentProvider;
import org.chromium.components.offline_items_collection.OfflineItem; import org.chromium.components.offline_items_collection.OfflineItem;
import org.chromium.components.offline_items_collection.OfflineItemState; import org.chromium.components.offline_items_collection.OfflineItemState;
...@@ -150,7 +149,7 @@ public class OfflineContentAggregatorNotificationBridgeUi ...@@ -150,7 +149,7 @@ public class OfflineContentAggregatorNotificationBridgeUi
private void pushItemToUi(OfflineItem item, OfflineItemVisuals visuals) { private void pushItemToUi(OfflineItem item, OfflineItemVisuals visuals) {
// TODO(http://crbug.com/855141): Find a cleaner way to hide unimportant UI updates. // TODO(http://crbug.com/855141): Find a cleaner way to hide unimportant UI updates.
// If it's a suggested page, do not add it to the notification UI. // If it's a suggested page, do not add it to the notification UI.
if (LegacyHelpers.isLegacyOfflinePage(item.id) && item.isSuggested) return; if (item.isSuggested) return;
DownloadInfo info = DownloadInfo.fromOfflineItem(item, visuals); DownloadInfo info = DownloadInfo.fromOfflineItem(item, visuals);
switch (item.state) { switch (item.state) {
......
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