Commit 68f6ba9b authored by Long Cheng's avatar Long Cheng Committed by Commit Bot

Skip initialize DTC for AppListSyncableService

Skip initialize DTC for AppListSyncableService if device
is set to tablet form factor.

factor devices.
devices between user sessions.

Bug: 1013732
Test: ApplistSyncableService is disabled on tablet form
Test: Applist position persist on tablet form factor
Change-Id: I5ed15c8d0c3381d4d6ebea5397b8a00779b653cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1901627
Commit-Queue: Long Cheng <lgcheng@google.com>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713142}
parent b2d99679
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
#include "ash/public/cpp/app_list/app_list_switches.h" #include "ash/public/cpp/app_list/app_list_switches.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h" #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
#include "chromeos/constants/chromeos_switches.h"
#endif // BUILDFLAG(ENABLE_APP_LIST) #endif // BUILDFLAG(ENABLE_APP_LIST)
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
...@@ -395,10 +396,14 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::SyncService* sync_service) { ...@@ -395,10 +396,14 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::SyncService* sync_service) {
#endif // !defined(OS_ANDROID) #endif // !defined(OS_ANDROID)
#if BUILDFLAG(ENABLE_APP_LIST) #if BUILDFLAG(ENABLE_APP_LIST)
controllers.push_back( // Temporarily Disable AppListSyncableService for tablet form factor devices.
std::make_unique<syncer::SyncableServiceBasedModelTypeController>( // See crbug/1013732 for details.
syncer::APP_LIST, GetModelTypeStoreService()->GetStoreFactory(), if (!chromeos::switches::IsTabletFormFactor()) {
GetSyncableServiceForType(syncer::APP_LIST), dump_stack)); controllers.push_back(
std::make_unique<syncer::SyncableServiceBasedModelTypeController>(
syncer::APP_LIST, GetModelTypeStoreService()->GetStoreFactory(),
GetSyncableServiceForType(syncer::APP_LIST), dump_stack));
}
#endif // BUILDFLAG(ENABLE_APP_LIST) #endif // BUILDFLAG(ENABLE_APP_LIST)
#if defined(OS_LINUX) || defined(OS_WIN) #if defined(OS_LINUX) || defined(OS_WIN)
......
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