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

Side by Side Diff: components/favicon/core/favicon_driver_impl.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/favicon/core/favicon_driver_impl.h" 5 #include "components/favicon/core/favicon_driver_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 12 matching lines...) Expand all
23 bool IsIconNTPEnabled() { 23 bool IsIconNTPEnabled() {
24 // Note: It's important to query the field trial state first, to ensure that 24 // Note: It's important to query the field trial state first, to ensure that
25 // UMA reports the correct group. 25 // UMA reports the correct group.
26 const std::string group_name = base::FieldTrialList::FindFullName("IconNTP"); 26 const std::string group_name = base::FieldTrialList::FindFullName("IconNTP");
27 using base::CommandLine; 27 using base::CommandLine;
28 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableIconNtp)) 28 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableIconNtp))
29 return false; 29 return false;
30 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableIconNtp)) 30 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableIconNtp))
31 return true; 31 return true;
32 32
33 return base::StartsWithASCII(group_name, "Enabled", true); 33 return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
34 } 34 }
35 35
36 #if defined(OS_ANDROID) || defined(OS_IOS) 36 #if defined(OS_ANDROID) || defined(OS_IOS)
37 const bool kEnableTouchIcon = true; 37 const bool kEnableTouchIcon = true;
38 #else 38 #else
39 const bool kEnableTouchIcon = false; 39 const bool kEnableTouchIcon = false;
40 #endif 40 #endif
41 41
42 } // namespace 42 } // namespace
43 43
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const std::vector<FaviconURL>& candidates) { 169 const std::vector<FaviconURL>& candidates) {
170 DCHECK(!candidates.empty()); 170 DCHECK(!candidates.empty());
171 favicon_handler_->OnUpdateFaviconURL(candidates); 171 favicon_handler_->OnUpdateFaviconURL(candidates);
172 if (touch_icon_handler_.get()) 172 if (touch_icon_handler_.get())
173 touch_icon_handler_->OnUpdateFaviconURL(candidates); 173 touch_icon_handler_->OnUpdateFaviconURL(candidates);
174 if (large_icon_handler_.get()) 174 if (large_icon_handler_.get())
175 large_icon_handler_->OnUpdateFaviconURL(candidates); 175 large_icon_handler_->OnUpdateFaviconURL(candidates);
176 } 176 }
177 177
178 } // namespace favicon 178 } // namespace favicon
OLDNEW
« no previous file with comments | « components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc ('k') | components/gcm_driver/registration_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698