| 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 20f75b77cf47bb20501a950fe513ee5b0710d4a7..99cff6f498eb201b759be06212d163ce263908af 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
|
| @@ -9,7 +9,6 @@
|
| #include <vector>
|
|
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/sync/profile_sync_service_factory.h"
|
| #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
|
| #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service_factory.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -17,9 +16,6 @@
|
| #include "components/sync/api/sync_change_processor.h"
|
| #include "components/sync/api/sync_data.h"
|
| #include "components/sync/api/sync_merge_result.h"
|
| -#include "components/sync/driver/pref_names.h"
|
| -#include "components/sync/driver/sync_prefs.h"
|
| -#include "components/sync/driver/sync_service.h"
|
| #include "components/sync/protocol/sync.pb.h"
|
|
|
| namespace arc {
|
| @@ -78,26 +74,6 @@ std::unique_ptr<ArcSyncItem> CreateSyncItemFromPrefs(
|
| package_info->last_backup_android_id, package_info->last_backup_time);
|
| }
|
|
|
| -bool ValidateEnableArcPackageSyncPref(Profile* profile) {
|
| - PrefService* pref_service = profile->GetPrefs();
|
| - // If device is set to sync everything, Arc package should be synced.
|
| - if (pref_service->GetBoolean(sync_driver::prefs::kSyncKeepEverythingSynced))
|
| - return true;
|
| -
|
| - bool apps_sync_enable = pref_service->GetBoolean(
|
| - sync_driver::SyncPrefs::GetPrefNameForDataType(syncer::APPS));
|
| - // ArcPackage sync service is controlled by apps checkbox in sync settings.
|
| - // Update ArcPackage sync setting pref if it is different from apps sync
|
| - // setting pref.
|
| - const char* arc_sync_path =
|
| - sync_driver::SyncPrefs::GetPrefNameForDataType(syncer::ARC_PACKAGE);
|
| - if (apps_sync_enable != pref_service->GetBoolean(arc_sync_path)) {
|
| - pref_service->SetBoolean(arc_sync_path, apps_sync_enable);
|
| - }
|
| -
|
| - return apps_sync_enable;
|
| -}
|
| -
|
| } // namespace
|
|
|
| // ArcPackageSyncableService::SyncItem
|
| @@ -254,17 +230,6 @@ bool ArcPackageSyncableService::SyncStarted() {
|
| if (sync_processor_.get())
|
| return true;
|
|
|
| - sync_driver::SyncService* sync_service =
|
| - ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_);
|
| - // ArcPackage sync service is controlled by apps checkbox in sync settings.
|
| - bool arc_package_sync_should_enable =
|
| - ValidateEnableArcPackageSyncPref(profile_);
|
| -
|
| - 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.";
|
| flare_ = sync_start_util::GetFlareForSyncableService(profile_->GetPath());
|
|
|