| 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 fac2adf67c409c01a9e7741db776b6637eb7b656..c28deda79fad5bbbabba6088962b1885fe952160 100644
|
| --- a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
|
| +++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
|
| @@ -8,6 +8,7 @@
|
| #include <unordered_map>
|
|
|
| #include "base/command_line.h"
|
| +#include "base/run_loop.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "chrome/browser/chromeos/arc/arc_auth_service.h"
|
| #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
|
| @@ -145,6 +146,8 @@ bool SyncArcPackageHelper::AllProfilesHaveSamePackageDetails() {
|
|
|
| void SyncArcPackageHelper::SetupArcService(Profile* profile, size_t id) {
|
| DCHECK(profile);
|
| + base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| + chromeos::switches::kEnableArc);
|
| const user_manager::User* user = CreateUserAndLogin(profile, id);
|
| // Have the user-to-profile mapping ready to avoid using the real profile
|
| // manager (which is null).
|
| @@ -159,6 +162,11 @@ void SyncArcPackageHelper::SetupArcService(Profile* profile, size_t id) {
|
|
|
| ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile);
|
| DCHECK(arc_app_list_prefs);
|
| +
|
| + base::RunLoop run_loop;
|
| + arc_app_list_prefs->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
|
| + run_loop.Run();
|
| +
|
| instance_map_[profile].reset(new FakeAppInstance(arc_app_list_prefs));
|
| DCHECK(instance_map_[profile].get());
|
| arc_app_list_prefs->app_instance_holder()->SetInstance(
|
|
|