Commit 9778b34b authored by Sergey Poromov's avatar Sergey Poromov Committed by Commit Bot

Revert "Fix default page break for Krane devices."

This reverts commit ace0df39.

Reason for revert: [sheriff]:
Consistent failures on MSan builds:
https://ci.chromium.org/p/chromium/builders/ci/Linux%20ChromiumOS%20MSan%20Tests
First failure:
https://ci.chromium.org/p/chromium/builders/ci/Linux%20ChromiumOS%20MSan%20Tests/17840

Original change's description:
> Fix default page break for Krane devices.
> 
> Adding default page break too early will cause the default page break
> gets deleted immediately.
> 
> Now move the installation of default page break after ChromeOS settings
> app is installed.
> 
> Bug: 1031410
> Test: Manual
> 
> Change-Id: If8d6522993518ccc109ac0bf368cdd077a97f301
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2056578
> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
> Commit-Queue: Long Cheng <lgcheng@google.com>
> Cr-Commit-Position: refs/heads/master@{#742304}

TBR=xiyuan@chromium.org,lgcheng@google.com

Change-Id: I056ec39290ce8cdf889d3ad8ad017e787e29d4ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1031410
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064210Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742573}
parent 0fce13aa
......@@ -20,7 +20,6 @@
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/chromeos/crostini/crostini_features.h"
#include "chrome/browser/chromeos/extensions/default_web_app_ids.h"
#include "chrome/browser/chromeos/file_manager/app_id.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
......@@ -190,11 +189,6 @@ bool IsPageBreakItem(const AppListSyncableService::SyncItem& sync_item) {
return sync_item.item_type == sync_pb::AppListSpecifics::TYPE_PAGE_BREAK;
}
// Returns true if the app is Settings app
bool IsOsSettingsApp(const std::string& app_id) {
return app_id == chromeos::default_web_apps::kOsSettingsAppId;
}
} // namespace
// AppListSyncableService::ScopedModelUpdaterFactoryForTest
......@@ -417,12 +411,12 @@ void AppListSyncableService::BuildModel() {
DCHECK(!ProfileSyncServiceFactory::GetForProfile(profile_)
->GetActiveDataTypes()
.Has(syncer::APP_LIST));
// Create call back to create the default page break items at later time so
// that default page break items are not removed by
// |PruneRedundantPageBreakItems|
install_default_page_breaks_ =
// Post a task to avoid adding the default page break items to allow other
// list items to be added first.
base::SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(&AppListSyncableService::InstallDefaultPageBreaks,
weak_ptr_factory_.GetWeakPtr());
weak_ptr_factory_.GetWeakPtr()));
}
}
......@@ -552,9 +546,6 @@ void AppListSyncableService::AddItem(
}
PruneRedundantPageBreakItems();
if (IsOsSettingsApp(sync_item->item_id) && install_default_page_breaks_)
std::move(install_default_page_breaks_).Run();
}
AppListSyncableService::SyncItem* AppListSyncableService::FindOrAddSyncItem(
......
......@@ -331,9 +331,6 @@ class AppListSyncableService : public syncer::SyncableService,
bool initial_sync_data_processed_;
bool first_app_list_sync_;
std::string oem_folder_name_;
// Callback to install default page breaks.
// Only set for first time user for tablet form devices.
base::OnceClosure install_default_page_breaks_;
base::OnceClosure wait_until_ready_to_sync_cb_;
// List of observers.
......
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