OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/app_list/search/search_controller_factory.h" | 5 #include "chrome/browser/ui/app_list/search/search_controller_factory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // session and running on Chrome OS. | 114 // session and running on Chrome OS. |
115 if (app_list::switches::IsDriveSearchInChromeLauncherEnabled() && | 115 if (app_list::switches::IsDriveSearchInChromeLauncherEnabled() && |
116 !profile->IsGuestSession()) { | 116 !profile->IsGuestSession()) { |
117 size_t search_api_group_id = | 117 size_t search_api_group_id = |
118 controller->AddGroup(kMaxLauncherSearchResults, 1.0); | 118 controller->AddGroup(kMaxLauncherSearchResults, 1.0); |
119 controller->AddProvider(search_api_group_id, | 119 controller->AddProvider(search_api_group_id, |
120 base::MakeUnique<LauncherSearchProvider>(profile)); | 120 base::MakeUnique<LauncherSearchProvider>(profile)); |
121 } | 121 } |
122 | 122 |
123 #if defined(OS_CHROMEOS) | 123 #if defined(OS_CHROMEOS) |
124 size_t playstore_api_group_id = | 124 if (features::IsPlayStoreAppSearchEnabled()) { |
125 controller->AddGroup(kMaxPlayStoreResults, 1.0); | 125 size_t playstore_api_group_id = |
126 controller->AddProvider(playstore_api_group_id, | 126 controller->AddGroup(kMaxPlayStoreResults, 1.0); |
127 base::MakeUnique<ArcPlayStoreSearchProvider>( | 127 controller->AddProvider( |
128 kMaxPlayStoreResults, profile, list_controller)); | 128 playstore_api_group_id, |
| 129 base::MakeUnique<ArcPlayStoreSearchProvider>(kMaxPlayStoreResults, |
| 130 profile, list_controller)); |
| 131 } |
129 #endif | 132 #endif |
130 return controller; | 133 return controller; |
131 } | 134 } |
132 | 135 |
133 } // namespace app_list | 136 } // namespace app_list |
OLD | NEW |