Skip to content

Commit

Permalink
Remove kAppServiceAsh from Crostini test.
Browse files Browse the repository at this point in the history
kAppServiceAsh is the flag to integrate AppService in UI app_list.
Since it has been enabled for a few months for M78, M79 release, it
should not be disabled, so the flag kAppServiceAsh can be removed.

BUG=1016159

Change-Id: I0235521beb53bdda1b50c07e8a6e4e11298ba71c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895254
Reviewed-by: Joel Hockey <joelhockey@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712039}
  • Loading branch information
nancy authored and Commit Bot committed Nov 4, 2019
1 parent d32986a commit af69db6
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions chrome/browser/chromeos/crostini/crostini_test_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,20 @@ void CrostiniTestHelper::ReInitializeAppServiceIntegration() {
chromeos::DBusThreadManager::Initialize();
}

if (base::FeatureList::IsEnabled(features::kAppServiceAsh)) {
// The App Service is originally initialized when the Profile is created,
// but this class' constructor takes the Profile* as an argument, which
// means that the fake user (created during that constructor) is
// necessarily configured after the App Service's initialization.
//
// Without further action, in tests (but not in production which looks at
// real users, not fakes), the App Service serves no Crostini apps, as at
// the time it looked, the profile/user doesn't have Crostini enabled.
//
// We therefore manually have the App Service re-examine whether Crostini
// is enabled for this profile.
auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile_);
proxy->ReInitializeCrostiniForTesting(profile_);
proxy->FlushMojoCallsForTesting();
}
// The App Service is originally initialized when the Profile is created,
// but this class' constructor takes the Profile* as an argument, which
// means that the fake user (created during that constructor) is
// necessarily configured after the App Service's initialization.
//
// Without further action, in tests (but not in production which looks at
// real users, not fakes), the App Service serves no Crostini apps, as at
// the time it looked, the profile/user doesn't have Crostini enabled.
//
// We therefore manually have the App Service re-examine whether Crostini
// is enabled for this profile.
auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile_);
proxy->ReInitializeCrostiniForTesting(profile_);
proxy->FlushMojoCallsForTesting();
}

void CrostiniTestHelper::UpdateAppKeywords(
Expand Down

0 comments on commit af69db6

Please sign in to comment.