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

Unified Diff: components/favicon/core/favicon_driver_impl.cc

Issue 2677023003: Clean up IconNTP-related code (Closed)
Patch Set: Created 3 years, 10 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
Index: components/favicon/core/favicon_driver_impl.cc
diff --git a/components/favicon/core/favicon_driver_impl.cc b/components/favicon/core/favicon_driver_impl.cc
index 8539b03159efaa2447ac6b181be83c54889537bc..b19f0daecf1c2970567a26a28161cf91f0cc8606 100644
--- a/components/favicon/core/favicon_driver_impl.cc
+++ b/components/favicon/core/favicon_driver_impl.cc
@@ -19,21 +19,6 @@
namespace favicon {
namespace {
-// Returns whether icon NTP is enabled by experiment.
-// TODO(huangs): Remove all 3 copies of this routine once Icon NTP launches.
-bool IsIconNTPEnabled() {
- // Note: It's important to query the field trial state first, to ensure that
- // UMA reports the correct group.
- const std::string group_name = base::FieldTrialList::FindFullName("IconNTP");
- using base::CommandLine;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableIconNtp))
- return false;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableIconNtp))
- return true;
-
- return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
-}
-
#if defined(OS_ANDROID) || defined(OS_IOS)
const bool kEnableTouchIcon = true;
#else
@@ -52,7 +37,7 @@ FaviconDriverImpl::FaviconDriverImpl(FaviconService* favicon_service,
favicon_service_, this, kEnableTouchIcon
? FaviconDriverObserver::NON_TOUCH_LARGEST
: FaviconDriverObserver::NON_TOUCH_16_DIP));
- if (kEnableTouchIcon || IsIconNTPEnabled()) {
+ if (kEnableTouchIcon) {
touch_icon_handler_.reset(new FaviconHandler(
favicon_service_, this, FaviconDriverObserver::TOUCH_LARGEST));
}

Powered by Google App Engine
This is Rietveld 408576698