| OLD | NEW |
| 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 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 AppListControllerDelegate* list_controller, | 249 AppListControllerDelegate* list_controller, |
| 250 std::unique_ptr<base::Clock> clock, | 250 std::unique_ptr<base::Clock> clock, |
| 251 AppListItemList* top_level_item_list) | 251 AppListItemList* top_level_item_list) |
| 252 : list_controller_(list_controller), | 252 : list_controller_(list_controller), |
| 253 top_level_item_list_(top_level_item_list), | 253 top_level_item_list_(top_level_item_list), |
| 254 clock_(std::move(clock)), | 254 clock_(std::move(clock)), |
| 255 update_results_factory_(this) { | 255 update_results_factory_(this) { |
| 256 data_sources_.push_back( | 256 data_sources_.push_back( |
| 257 std::unique_ptr<DataSource>(new ExtensionDataSource(profile, this))); | 257 std::unique_ptr<DataSource>(new ExtensionDataSource(profile, this))); |
| 258 #if defined(OS_CHROMEOS) | 258 #if defined(OS_CHROMEOS) |
| 259 if (arc::ArcAuthService::IsAllowedForProfile(profile)) { | 259 if (arc::ArcSessionManager::IsAllowedForProfile(profile)) { |
| 260 data_sources_.push_back( | 260 data_sources_.push_back( |
| 261 std::unique_ptr<DataSource>(new ArcDataSource(profile, this))); | 261 std::unique_ptr<DataSource>(new ArcDataSource(profile, this))); |
| 262 } | 262 } |
| 263 #endif | 263 #endif |
| 264 | 264 |
| 265 RefreshApps(); | 265 RefreshApps(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 AppSearchProvider::~AppSearchProvider() {} | 268 AppSearchProvider::~AppSearchProvider() {} |
| 269 | 269 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 } else { | 356 } else { |
| 357 if (!update_results_factory_.HasWeakPtrs()) { | 357 if (!update_results_factory_.HasWeakPtrs()) { |
| 358 base::ThreadTaskRunnerHandle::Get()->PostTask( | 358 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 359 FROM_HERE, base::Bind(&AppSearchProvider::UpdateResults, | 359 FROM_HERE, base::Bind(&AppSearchProvider::UpdateResults, |
| 360 update_results_factory_.GetWeakPtr())); | 360 update_results_factory_.GetWeakPtr())); |
| 361 } | 361 } |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 | 364 |
| 365 } // namespace app_list | 365 } // namespace app_list |
| OLD | NEW |