Commit af5d2321 authored by nancy's avatar nancy Committed by Commit Bot

Remove kAppServiceAsh flag from ui/app_list.

BUG=1016159

Change-Id: I17381ed839025b621600b8cd2395e95c8d035f72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919533
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718927}
parent 3afea014
...@@ -88,12 +88,9 @@ syncer::SyncData GetSyncDataFromSyncItem( ...@@ -88,12 +88,9 @@ syncer::SyncData GetSyncDataFromSyncItem(
bool AppIsDefault(Profile* profile, const std::string& id) { bool AppIsDefault(Profile* profile, const std::string& id) {
// Querying the extension system is legacy logic from the time that we only // Querying the extension system is legacy logic from the time that we only
// had extension apps. The App Service is the canonical source of truth, when // had extension apps.
// it is enabled, but we are not there yet (crbug.com/826982).
if (extensions::ExtensionPrefs::Get(profile)->WasInstalledByDefault(id)) if (extensions::ExtensionPrefs::Get(profile)->WasInstalledByDefault(id))
return true; return true;
if (!base::FeatureList::IsEnabled(features::kAppServiceAsh))
return false;
bool result = false; bool result = false;
apps::AppServiceProxyFactory::GetForProfile(profile) apps::AppServiceProxyFactory::GetForProfile(profile)
...@@ -105,12 +102,6 @@ bool AppIsDefault(Profile* profile, const std::string& id) { ...@@ -105,12 +102,6 @@ bool AppIsDefault(Profile* profile, const std::string& id) {
} }
void SetAppIsDefaultForTest(Profile* profile, const std::string& id) { void SetAppIsDefaultForTest(Profile* profile, const std::string& id) {
if (!base::FeatureList::IsEnabled(features::kAppServiceAsh)) {
extensions::ExtensionPrefs::Get(profile)->UpdateExtensionPref(
id, "was_installed_by_default", std::make_unique<base::Value>(true));
return;
}
apps::mojom::AppPtr delta = apps::mojom::App::New(); apps::mojom::AppPtr delta = apps::mojom::App::New();
delta->app_type = apps::mojom::AppType::kExtension; delta->app_type = apps::mojom::AppType::kExtension;
delta->app_id = id; delta->app_id = id;
...@@ -314,23 +305,7 @@ AppListSyncableService::AppListSyncableService(Profile* profile) ...@@ -314,23 +305,7 @@ AppListSyncableService::AppListSyncableService(Profile* profile)
extension_system_(extensions::ExtensionSystem::Get(profile)), extension_system_(extensions::ExtensionSystem::Get(profile)),
extension_registry_(extensions::ExtensionRegistry::Get(profile)), extension_registry_(extensions::ExtensionRegistry::Get(profile)),
initial_sync_data_processed_(false), initial_sync_data_processed_(false),
first_app_list_sync_(true), first_app_list_sync_(true) {
is_app_service_enabled_(
base::FeatureList::IsEnabled(features::kAppServiceAsh)) {
// This log message helps us gather better manual bug reports, as we
// gradually roll out enabling the AppList + AppService integration across
// Chrome OS' various release channels.
//
// Asking users to inspect chrome://flags/#app-service-ash isn't enough, as
// that UI can display just "Default" without detailing whether the default
// is to enable or disable. Instead, we can ask them to inspect
// file:///var/log/chrome/chrome for this log message.
//
// TODO(crbug.com/826982): remove this log message once the roll out is
// complete, hopefully by mid-2019.
VLOG(1) << "AppList + AppService integration: "
<< (is_app_service_enabled_ ? "enabled" : "disabled");
if (g_model_updater_factory_callback_for_test_) if (g_model_updater_factory_callback_for_test_)
model_updater_ = g_model_updater_factory_callback_for_test_->Run(); model_updater_ = g_model_updater_factory_callback_for_test_->Run();
else else
......
...@@ -326,7 +326,6 @@ class AppListSyncableService : public syncer::SyncableService, ...@@ -326,7 +326,6 @@ class AppListSyncableService : public syncer::SyncableService,
syncer::SyncableService::StartSyncFlare flare_; syncer::SyncableService::StartSyncFlare flare_;
bool initial_sync_data_processed_; bool initial_sync_data_processed_;
bool first_app_list_sync_; bool first_app_list_sync_;
const bool is_app_service_enabled_;
std::string oem_folder_name_; std::string oem_folder_name_;
base::OnceClosure wait_until_ready_to_sync_cb_; base::OnceClosure wait_until_ready_to_sync_cb_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment