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/spellcheck/common/spellcheck_features.cc

Issue 2636843004: [Android] Enable spellcheck on non low-end devices by default. (Closed)
Patch Set: update histograms.xml 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | tools/metrics/histograms/histograms.xml » ('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/spellcheck/common/spellcheck_features.h" 5 #include "components/spellcheck/common/spellcheck_features.h"
6 6
7 #include "base/sys_info.h" 7 #include "base/sys_info.h"
8 #include "components/spellcheck/spellcheck_build_features.h" 8 #include "components/spellcheck/spellcheck_build_features.h"
9 9
10 namespace spellcheck { 10 namespace spellcheck {
11 11
12 #if BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_ANDROID) 12 #if BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_ANDROID)
13 13
14 // Enables/disables Android spellchecker. 14 // Enables/disables Android spellchecker.
15 const base::Feature kAndroidSpellChecker{ 15 const base::Feature kAndroidSpellChecker{
16 "AndroidSpellChecker", base::FEATURE_DISABLED_BY_DEFAULT}; 16 "AndroidSpellChecker", base::FEATURE_DISABLED_BY_DEFAULT};
17 17
18 // Enables/disables Android spellchecker on non low-end Android devices. 18 // Enables/disables Android spellchecker on non low-end Android devices.
19 const base::Feature kAndroidSpellCheckerNonLowEnd{ 19 const base::Feature kAndroidSpellCheckerNonLowEnd{
20 "AndroidSpellCheckerNonLowEnd", base::FEATURE_DISABLED_BY_DEFAULT}; 20 "AndroidSpellCheckerNonLowEnd", base::FEATURE_ENABLED_BY_DEFAULT};
21 21
22 bool IsAndroidSpellCheckFeatureEnabled() { 22 bool IsAndroidSpellCheckFeatureEnabled() {
23 if (base::FeatureList::IsEnabled( 23 if (base::FeatureList::IsEnabled(spellcheck::kAndroidSpellCheckerNonLowEnd)) {
24 spellcheck::kAndroidSpellCheckerNonLowEnd)) {
25 return !base::SysInfo::IsLowEndDevice(); 24 return !base::SysInfo::IsLowEndDevice();
26 } 25 }
27 26
28 if (base::FeatureList::IsEnabled( 27 if (base::FeatureList::IsEnabled(spellcheck::kAndroidSpellChecker)) {
29 spellcheck::kAndroidSpellChecker)) {
30 return true; 28 return true;
31 } 29 }
32 30
33 return false; 31 return false;
34 } 32 }
35 33
36 #endif // BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_ANDROID) 34 #endif // BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_ANDROID)
37 35
38 } // namespace spellcheck 36 } // namespace spellcheck
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698