Commit d9d8f99b authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Never show reading list items for UI refresh phase 1.

The NTP already has a reading list icon with a badged count
when there are unread items so the larger RL collection
items is superfluous.

Bug: 805638
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ic34ed523bb6946017ec312aca6e6c9c11ac2b2f3
Reviewed-on: https://chromium-review.googlesource.com/947836Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540851}
parent d3249d1a
...@@ -29,6 +29,7 @@ source_set("ntp_snippets") { ...@@ -29,6 +29,7 @@ source_set("ntp_snippets") {
"//ios/chrome/browser/history", "//ios/chrome/browser/history",
"//ios/chrome/browser/reading_list", "//ios/chrome/browser/reading_list",
"//ios/chrome/browser/signin", "//ios/chrome/browser/signin",
"//ios/chrome/browser/ui:ui_util",
"//ios/chrome/common", "//ios/chrome/common",
"//ios/web", "//ios/web",
"//net", "//net",
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "ios/chrome/browser/pref_names.h" #include "ios/chrome/browser/pref_names.h"
#include "ios/chrome/browser/reading_list/reading_list_model_factory.h" #include "ios/chrome/browser/reading_list/reading_list_model_factory.h"
#include "ios/chrome/browser/signin/identity_manager_factory.h" #include "ios/chrome/browser/signin/identity_manager_factory.h"
#include "ios/chrome/browser/ui/ui_util.h"
#include "ios/chrome/common/channel_info.h" #include "ios/chrome/common/channel_info.h"
#include "ios/web/public/browser_state.h" #include "ios/web/public/browser_state.h"
#include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_context_getter.h"
...@@ -139,6 +140,10 @@ std::unique_ptr<KeyedService> CreateChromeContentSuggestionsService( ...@@ -139,6 +140,10 @@ std::unique_ptr<KeyedService> CreateChromeContentSuggestionsService(
void RegisterReadingListProvider(ContentSuggestionsService* service, void RegisterReadingListProvider(ContentSuggestionsService* service,
web::BrowserState* browser_state) { web::BrowserState* browser_state) {
// Prevent loading any reading list items for refresh.
if (IsUIRefreshPhase1Enabled())
return;
ios::ChromeBrowserState* chrome_browser_state = ios::ChromeBrowserState* chrome_browser_state =
ios::ChromeBrowserState::FromBrowserState(browser_state); ios::ChromeBrowserState::FromBrowserState(browser_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