Commit 7f4a97fb authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[Respin] Reenable baked-in popular sites

This cl complements https://chromium-review.googlesource.com/c/564614/
in that it reenables the baked-in popular sites for iOS.
The reason for not reverting the old CL is the includes that were needed
to make the presubmit happy.

Bug: 737607
Change-Id: I24020f6949aff679bc80a918f61610d32056ceda
Reviewed-on: https://chromium-review.googlesource.com/565565Reviewed-by: default avatarChris Pickel <sfiera@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485309}
parent a16d257c
......@@ -31,7 +31,7 @@
#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#if defined(OS_ANDROID)
#if defined(OS_ANDROID) || defined(OS_IOS)
#include "base/json/json_reader.h"
#include "components/grit/components_resources.h"
#include "ui/base/resource/resource_bundle.h"
......@@ -132,7 +132,7 @@ PopularSites::SitesVector ParseSiteList(const base::ListValue& list) {
return sites;
}
#if defined(GOOGLE_CHROME_BUILD) && defined(OS_ANDROID)
#if defined(GOOGLE_CHROME_BUILD) && (defined(OS_ANDROID) || defined(OS_IOS))
void SetDefaultResourceForSite(int index,
int resource_id,
base::ListValue* sites) {
......@@ -146,7 +146,7 @@ void SetDefaultResourceForSite(int index,
// Creates the list of popular sites based on a snapshot available for mobile.
std::unique_ptr<base::ListValue> DefaultPopularSites() {
#if !defined(OS_ANDROID)
#if !defined(OS_ANDROID) && !defined(OS_IOS)
return base::MakeUnique<base::ListValue>();
#else
if (!base::FeatureList::IsEnabled(kPopularSitesBakedInContentFeature)) {
......
......@@ -57,7 +57,7 @@ using TestPopularSiteVector = std::vector<TestPopularSite>;
}
size_t GetNumberOfDefaultPopularSitesForPlatform() {
#if defined(OS_ANDROID)
#if defined(OS_ANDROID) || defined(OS_IOS)
return 8ul;
#else
return 0ul;
......@@ -256,7 +256,7 @@ TEST_F(PopularSitesTest, AddsIconResourcesToDefaultPages) {
std::unique_ptr<PopularSites> popular_sites =
CreatePopularSites(url_request_context.get());
#if defined(GOOGLE_CHROME_BUILD) && defined(OS_ANDROID)
#if defined(GOOGLE_CHROME_BUILD) && (defined(OS_ANDROID) || defined(OS_IOS))
ASSERT_FALSE(popular_sites->sites().empty());
for (const auto& site : popular_sites->sites()) {
EXPECT_THAT(site.default_icon_resource, Gt(0));
......
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