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

Side by Side Diff: components/spellcheck/common/spellcheck_features.cc

Issue 2284583002: [Android] Add AndroidSpellChecker feature to allow for gradual rollout using finch. (Closed)
Patch Set: fix compile Created 4 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/spellcheck/common/spellcheck_features.h"
6
7 #include "base/sys_info.h"
8
9 namespace spellcheck {
10
11 #if defined(ENABLE_SPELLCHECK) && defined(OS_ANDROID)
12
13 // Enables/disables Android spellchecker.
14 const base::Feature kAndroidSpellChecker{
15 "AndroidSpellChecker", base::FEATURE_DISABLED_BY_DEFAULT};
16
17 // Enables/disables Android spellchecker on non low-end Android devices.
18 const base::Feature kAndroidSpellCheckerNonLowEnd{
19 "AndroidSpellCheckerNonLowEnd", base::FEATURE_DISABLED_BY_DEFAULT};
20
21 bool IsAndroidSpellCheckFeatureEnabled() {
22 if (base::FeatureList::IsEnabled(
23 spellcheck::kAndroidSpellCheckerNonLowEnd)) {
24 return !base::SysInfo::IsLowEndDevice();
25 }
26
27 if (base::FeatureList::IsEnabled(
28 spellcheck::kAndroidSpellChecker)) {
29 return true;
30 }
31
32 return false;
33 }
34
35 #endif // defined(ENABLE_SPELLCHECK) && defined(OS_ANDROID)
36
37 } // namespace spellcheck
OLDNEW
« no previous file with comments | « components/spellcheck/common/spellcheck_features.h ('k') | components/spellcheck/common/spellcheck_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698