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

Unified Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.cc

Issue 2389763003: arc: Fix race when arc package sync service starts. (Closed)
Patch Set: Add Check in case ArcAppListPrefs gets deleted early. Created 4 years, 2 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_app_list_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/sync_arc_package_helper.cc
diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
index 7a146a35b38a795a6db5c0b9d2194d227bb8c8d4..609c855e72441f3a77dc9dde6577233b5ee9f7dc 100644
--- a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
@@ -170,6 +170,11 @@ void SyncArcPackageHelper::SetupArcService(Profile* profile, size_t id) {
DCHECK(instance_map_[profile].get());
arc_app_list_prefs->app_instance_holder()->SetInstance(
instance_map_[profile].get());
+ // OnPackageListRefreshed will be called when AppInstance is ready.
+ // For fakeAppInstance we use SendRefreshPackageList to make sure that
+ // OnPackageListRefreshed will be called.
+ instance_map_[profile]->SendRefreshPackageList(
+ std::vector<arc::mojom::ArcPackageInfo>());
}
void SyncArcPackageHelper::InstallPackage(
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_app_list_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698