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

Side by Side Diff: components/ntp_tiles/constants.cc

Issue 2920773002: Enable Home Page tile by default for Chrome Home. (Closed)
Patch Set: Remove feature constant completely Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « components/ntp_tiles/constants.h ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/ntp_tiles/constants.h" 5 #include "components/ntp_tiles/constants.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "components/ntp_tiles/switches.h" 9 #include "components/ntp_tiles/switches.h"
10 10
11 namespace ntp_tiles { 11 namespace ntp_tiles {
12 12
13 const char kPopularSitesFieldTrialName[] = "NTPPopularSites"; 13 const char kPopularSitesFieldTrialName[] = "NTPPopularSites";
14 14
15 extern const base::Feature kPopularSitesBakedInContentFeature{ 15 extern const base::Feature kPopularSitesBakedInContentFeature{
16 "NTPPopularSitesBakedInContent", base::FEATURE_ENABLED_BY_DEFAULT}; 16 "NTPPopularSitesBakedInContent", base::FEATURE_ENABLED_BY_DEFAULT};
17 17
18 extern const base::Feature kNtpMostLikelyFaviconsFromServerFeature{ 18 extern const base::Feature kNtpMostLikelyFaviconsFromServerFeature{
19 "NTPMostLikelyFaviconsFromServer", base::FEATURE_DISABLED_BY_DEFAULT}; 19 "NTPMostLikelyFaviconsFromServer", base::FEATURE_DISABLED_BY_DEFAULT};
20 20
21 extern const base::Feature kPinHomePageAsTileFeature{
22 "PinHomePageAsTile", base::FEATURE_DISABLED_BY_DEFAULT};
23
24 bool AreNtpMostLikelyFaviconsFromServerEnabled() { 21 bool AreNtpMostLikelyFaviconsFromServerEnabled() {
25 // Check if the experimental flag is forced on or off. 22 // Check if the experimental flag is forced on or off.
26 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 23 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
27 if (command_line->HasSwitch( 24 if (command_line->HasSwitch(
28 switches::kEnableNtpMostLikelyFaviconsFromServer)) { 25 switches::kEnableNtpMostLikelyFaviconsFromServer)) {
29 return true; 26 return true;
30 } else if (command_line->HasSwitch( 27 } else if (command_line->HasSwitch(
31 switches::kDisableNtpMostLikelyFaviconsFromServer)) { 28 switches::kDisableNtpMostLikelyFaviconsFromServer)) {
32 return false; 29 return false;
33 } 30 }
34 31
35 // Check if the finch experiment is turned on. 32 // Check if the finch experiment is turned on.
36 return base::FeatureList::IsEnabled(kNtpMostLikelyFaviconsFromServerFeature); 33 return base::FeatureList::IsEnabled(kNtpMostLikelyFaviconsFromServerFeature);
37 } 34 }
38 35
39 } // namespace ntp_tiles 36 } // namespace ntp_tiles
OLDNEW
« no previous file with comments | « components/ntp_tiles/constants.h ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698