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

Side by Side Diff: ui/app_list/app_list_features.cc

Issue 2972243002: Fix app list item indexing bug. (Closed)
Patch Set: oshima's comments. Created 3 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
« no previous file with comments | « ui/app_list/app_list_features.h ('k') | ui/app_list/test/app_list_test_view_delegate.h » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ui/app_list/app_list_features.h" 5 #include "ui/app_list/app_list_features.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/metrics/field_trial_params.h" 8 #include "base/metrics/field_trial_params.h"
9 #include "ui/app_list/app_list_switches.h" 9 #include "ui/app_list/app_list_switches.h"
10 10
(...skipping 25 matching lines...) Expand all
36 return switches::IsFullscreenAppListEnabled() || 36 return switches::IsFullscreenAppListEnabled() ||
37 base::FeatureList::IsEnabled(kEnableFullscreenAppList); 37 base::FeatureList::IsEnabled(kEnableFullscreenAppList);
38 } 38 }
39 39
40 bool IsSearchResultsNewDesignEnabled() { 40 bool IsSearchResultsNewDesignEnabled() {
41 return IsFullscreenAppListEnabled() || 41 return IsFullscreenAppListEnabled() ||
42 (IsAnswerCardEnabled() && !IsAnswerCardDarkRunEnabled()); 42 (IsAnswerCardEnabled() && !IsAnswerCardDarkRunEnabled());
43 } 43 }
44 44
45 bool IsPlayStoreAppSearchEnabled() { 45 bool IsPlayStoreAppSearchEnabled() {
46 static const bool enabled = 46 // Not using local static variable to allow tests to change this value.
47 base::FeatureList::IsEnabled(kEnablePlayStoreAppSearch); 47 return base::FeatureList::IsEnabled(kEnablePlayStoreAppSearch);
48 return enabled;
49 } 48 }
50 49
51 int AnswerCardMaxWidth() { 50 int AnswerCardMaxWidth() {
52 static const int max_width = base::GetFieldTrialParamByFeatureAsInt( 51 static const int max_width = base::GetFieldTrialParamByFeatureAsInt(
53 kEnableAnswerCard, "CardMaxWidth", 608); 52 kEnableAnswerCard, "CardMaxWidth", 608);
54 return max_width; 53 return max_width;
55 } 54 }
56 55
57 int AnswerCardMaxHeight() { 56 int AnswerCardMaxHeight() {
58 static const int max_height = base::GetFieldTrialParamByFeatureAsInt( 57 static const int max_height = base::GetFieldTrialParamByFeatureAsInt(
59 kEnableAnswerCard, "CardMaxHeight", 266); 58 kEnableAnswerCard, "CardMaxHeight", 266);
60 return max_height; 59 return max_height;
61 } 60 }
62 61
63 std::string AnswerServerUrl() { 62 std::string AnswerServerUrl() {
64 return base::GetFieldTrialParamValueByFeature(kEnableAnswerCard, "ServerUrl"); 63 return base::GetFieldTrialParamValueByFeature(kEnableAnswerCard, "ServerUrl");
65 } 64 }
66 65
67 } // namespace features 66 } // namespace features
68 } // namespace app_list 67 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_features.h ('k') | ui/app_list/test/app_list_test_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698