Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Unified Diff: components/ntp_tiles/popular_sites_impl.cc

Issue 2741413008: Introduce flag to disable static popular sites. (Closed)
Patch Set: Use feature instead of params Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_tiles/constants.cc ('k') | components/ntp_tiles/popular_sites_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/popular_sites_impl.cc
diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
index 7777e37dc47718bdca635e405a29690262ee1137..978671785002a926e86ca9e6d82b1df83555eb8e 100644
--- a/components/ntp_tiles/popular_sites_impl.cc
+++ b/components/ntp_tiles/popular_sites_impl.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
@@ -153,6 +154,9 @@ std::unique_ptr<base::ListValue> DefaultPopularSites() {
#if !defined(OS_ANDROID) && !defined(OS_IOS)
return base::MakeUnique<base::ListValue>();
#else
+ if (!base::FeatureList::IsEnabled(kPopularSitesBakedInContentFeature)) {
+ return base::MakeUnique<base::ListValue>();
+ }
std::unique_ptr<base::ListValue> sites =
base::ListValue::From(base::JSONReader::Read(
ResourceBundle::GetSharedInstance().GetRawDataResource(
« no previous file with comments | « components/ntp_tiles/constants.cc ('k') | components/ntp_tiles/popular_sites_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698