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

Side by Side Diff: chrome/browser/ui/app_list/search/app_search_provider.cc

Issue 2668153002: Revert of Move more utility functions to arc_util. (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_search_provider.h" 5 #include "chrome/browser/ui/app_list/search/app_search_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 #include "extensions/browser/extension_registry.h" 26 #include "extensions/browser/extension_registry.h"
27 #include "extensions/browser/extension_system.h" 27 #include "extensions/browser/extension_system.h"
28 #include "extensions/common/extension.h" 28 #include "extensions/common/extension.h"
29 #include "extensions/common/extension_set.h" 29 #include "extensions/common/extension_set.h"
30 #include "ui/app_list/app_list_item.h" 30 #include "ui/app_list/app_list_item.h"
31 #include "ui/app_list/app_list_model.h" 31 #include "ui/app_list/app_list_model.h"
32 #include "ui/app_list/search/tokenized_string.h" 32 #include "ui/app_list/search/tokenized_string.h"
33 #include "ui/app_list/search/tokenized_string_match.h" 33 #include "ui/app_list/search/tokenized_string_match.h"
34 34
35 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
36 #include "chrome/browser/chromeos/arc/arc_util.h"
37 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 36 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
38 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" 37 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
39 #include "chrome/browser/ui/app_list/search/arc_app_result.h" 38 #include "chrome/browser/ui/app_list/search/arc_app_result.h"
40 #endif 39 #endif
41 40
42 using extensions::ExtensionRegistry; 41 using extensions::ExtensionRegistry;
43 42
44 namespace { 43 namespace {
45 44
46 // The size of each step unlaunched apps should increase their relevance by. 45 // The size of each step unlaunched apps should increase their relevance by.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 AppListControllerDelegate* list_controller, 251 AppListControllerDelegate* list_controller,
253 std::unique_ptr<base::Clock> clock, 252 std::unique_ptr<base::Clock> clock,
254 AppListItemList* top_level_item_list) 253 AppListItemList* top_level_item_list)
255 : list_controller_(list_controller), 254 : list_controller_(list_controller),
256 top_level_item_list_(top_level_item_list), 255 top_level_item_list_(top_level_item_list),
257 clock_(std::move(clock)), 256 clock_(std::move(clock)),
258 update_results_factory_(this) { 257 update_results_factory_(this) {
259 data_sources_.push_back( 258 data_sources_.push_back(
260 std::unique_ptr<DataSource>(new ExtensionDataSource(profile, this))); 259 std::unique_ptr<DataSource>(new ExtensionDataSource(profile, this)));
261 #if defined(OS_CHROMEOS) 260 #if defined(OS_CHROMEOS)
262 if (arc::IsArcAllowedForProfile(profile)) { 261 if (arc::ArcSessionManager::IsAllowedForProfile(profile)) {
263 data_sources_.push_back( 262 data_sources_.push_back(
264 std::unique_ptr<DataSource>(new ArcDataSource(profile, this))); 263 std::unique_ptr<DataSource>(new ArcDataSource(profile, this)));
265 } 264 }
266 #endif 265 #endif
267 266
268 RefreshApps(); 267 RefreshApps();
269 } 268 }
270 269
271 AppSearchProvider::~AppSearchProvider() {} 270 AppSearchProvider::~AppSearchProvider() {}
272 271
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } else { 356 } else {
358 if (!update_results_factory_.HasWeakPtrs()) { 357 if (!update_results_factory_.HasWeakPtrs()) {
359 base::ThreadTaskRunnerHandle::Get()->PostTask( 358 base::ThreadTaskRunnerHandle::Get()->PostTask(
360 FROM_HERE, base::Bind(&AppSearchProvider::UpdateResults, 359 FROM_HERE, base::Bind(&AppSearchProvider::UpdateResults,
361 update_results_factory_.GetWeakPtr())); 360 update_results_factory_.GetWeakPtr()));
362 } 361 }
363 } 362 }
364 } 363 }
365 364
366 } // namespace app_list 365 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698