| Index: chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
|
| diff --git a/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc b/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
|
| index 072d8ad12dd536ba0d957154323e2f1a7e24195d..61fbba637b4cb2a59b1e6ad6f6cb7462a47e0c41 100644
|
| --- a/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
|
| +++ b/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service_factory.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/prefs/scoped_user_pref_update.h"
|
| +#include "components/sync_driver/sync_prefs.h"
|
| #include "components/sync_driver/sync_service.h"
|
| #include "sync/api/sync_change_processor.h"
|
| #include "sync/api/sync_data.h"
|
| @@ -229,8 +230,14 @@ bool ArcPackageSyncableService::SyncStarted() {
|
|
|
| sync_driver::SyncService* sync_service =
|
| ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_);
|
| - if (sync_service)
|
| - sync_service->ReenableDatatype(syncer::ARC_PACKAGE);
|
| + // ArcPackage sync service is controlled by apps checkbox in sync settings.
|
| + bool arc_package_sync_should_enable = profile_->GetPrefs()->GetBoolean(
|
| + sync_driver::SyncPrefs::GetPrefNameForDataType(syncer::ARC_PACKAGE));
|
| +
|
| + if (!sync_service || !arc_package_sync_should_enable)
|
| + return false;
|
| +
|
| + sync_service->ReenableDatatype(syncer::ARC_PACKAGE);
|
|
|
| if (flare_.is_null()) {
|
| VLOG(2) << this << ": SyncStarted: Flare.";
|
|
|