Commit 9f17ae81 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Refreshes Discover Feed if History was cleared.

Bug: 1085419
Change-Id: I3462548de584dbc49601c0c608d1046f6dd770ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363725
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799974}
parent 4dd9daff
...@@ -26,9 +26,7 @@ DiscoverFeedService::DiscoverFeedService(ChromeBrowserState* browser_state) { ...@@ -26,9 +26,7 @@ DiscoverFeedService::DiscoverFeedService(ChromeBrowserState* browser_state) {
DiscoverFeedConfiguration* discover_config = DiscoverFeedConfiguration* discover_config =
[[DiscoverFeedConfiguration alloc] init]; [[DiscoverFeedConfiguration alloc] init];
discover_config.browserState = browser_state; discover_config.browserState = browser_state;
// TODO(crbug.com/1085419): Send discover_config once downstream CL lands. discover_feed_provider_->StartFeed(discover_config);
discover_feed_provider_->StartFeed(
AuthenticationServiceFactory::GetForBrowserState(browser_state));
} }
DiscoverFeedService::~DiscoverFeedService() {} DiscoverFeedService::~DiscoverFeedService() {}
......
...@@ -342,10 +342,15 @@ ...@@ -342,10 +342,15 @@
}); });
}; };
// Set the kLastClearBrowsingDataTime Pref. // If browsing History will be cleared set the kLastClearBrowsingDataTime.
self.browserState->GetPrefs()->SetInt64( // TODO(crbug.com/1085419): This pref is used by the Feed to prevent the
browsing_data::prefs::kLastClearBrowsingDataTime, // showing of customized content after history has been cleared. We might want
base::Time::Now().ToTimeT()); // to create a specific Pref for this.
if (IsRemoveDataMaskSet(removeMask, BrowsingDataRemoveMask::REMOVE_HISTORY)) {
browserState->GetPrefs()->SetInt64(
browsing_data::prefs::kLastClearBrowsingDataTime,
base::Time::Now().ToTimeT());
}
[self.dispatcher [self.dispatcher
removeBrowsingDataForBrowserState:browserState removeBrowsingDataForBrowserState:browserState
......
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