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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc

Issue 2311463002: [Merge to M53]arc: Enable user control for Arc package sync. (Closed)
Patch Set: arc: Enable user control for Arc package sync. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bcdb6d21d9a43e57ad33daf5e088d2557846ff4d..de19ba3fdb48d69b29405584dea515ada5df0ecd 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
@@ -585,9 +585,6 @@ void ArcAppListPrefs::OnInstanceReady() {
app_instance->Init(binding_.CreateInterfacePtrAndBind());
app_instance->RefreshAppList();
-
- // Start ArcPackageSyncService.
- sync_service_->SyncStarted();
}
void ArcAppListPrefs::OnInstanceClosed() {
@@ -989,6 +986,13 @@ void ArcAppListPrefs::OnPackageListRefreshed(
if (!current_packages.count(package_name))
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();
}
std::vector<std::string> ArcAppListPrefs::GetPackagesFromPrefs() const {
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698