| Index: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| index b86400a65d6f48420e2ca720407d9504d8bd7cda..708dd83372fb2bbe16e4c48e13de0ddc45dbb1ab 100644
|
| --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
|
| @@ -666,6 +666,7 @@ void ArcAppListPrefs::OnInstanceClosed() {
|
| }
|
|
|
| is_initialized_ = false;
|
| + package_list_initial_refreshed_ = false;
|
| }
|
|
|
| void ArcAppListPrefs::MaybeAddNonLaunchableApp(const std::string& name,
|
| @@ -1132,12 +1133,13 @@ void ArcAppListPrefs::OnPackageListRefreshed(
|
| RemovePackageFromPrefs(prefs_, package_name);
|
| }
|
|
|
| - // Start ArcPackageSyncService ASAP. This is the call_back of
|
| - // app_instance->RefreshAppList() in OnInstanceReady(). SyncStarted() should
|
| - // only be called after packagelist refresh is completed. SyncStarted() is
|
| - // no-op after first time setup or if sync is disabled.
|
| - DCHECK(sync_service_);
|
| - sync_service_->SyncStarted();
|
| + // TODO(lgcheng@) File http://b/31944261. Remove the flag after Android side
|
| + // cleanup.
|
| + if (package_list_initial_refreshed_)
|
| + return;
|
| +
|
| + package_list_initial_refreshed_ = true;
|
| + FOR_EACH_OBSERVER(Observer, observer_list_, OnPackageListInitialRefreshed());
|
| }
|
|
|
| std::vector<std::string> ArcAppListPrefs::GetPackagesFromPrefs() const {
|
|
|