| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h" | 5 #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h" |
| 6 | 6 |
| 7 #include <unordered_set> | 7 #include <unordered_set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 12 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 13 #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service_factory.h" | 13 #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service_factory.h" |
| 14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 15 #include "components/prefs/scoped_user_pref_update.h" | 15 #include "components/prefs/scoped_user_pref_update.h" |
| 16 #include "components/sync/api/sync_change_processor.h" | 16 #include "components/sync/model/sync_change_processor.h" |
| 17 #include "components/sync/api/sync_data.h" | 17 #include "components/sync/model/sync_data.h" |
| 18 #include "components/sync/api/sync_merge_result.h" | 18 #include "components/sync/model/sync_merge_result.h" |
| 19 #include "components/sync/protocol/sync.pb.h" | 19 #include "components/sync/protocol/sync.pb.h" |
| 20 | 20 |
| 21 namespace arc { | 21 namespace arc { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 using syncer::SyncChange; | 25 using syncer::SyncChange; |
| 26 using ArcSyncItem = ArcPackageSyncableService::SyncItem; | 26 using ArcSyncItem = ArcPackageSyncableService::SyncItem; |
| 27 | 27 |
| 28 constexpr int64_t kNoAndroidID = 0; | 28 constexpr int64_t kNoAndroidID = 0; |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 436 |
| 437 bool ArcPackageSyncableService::ShouldSyncPackage( | 437 bool ArcPackageSyncableService::ShouldSyncPackage( |
| 438 const std::string& package_name) const { | 438 const std::string& package_name) const { |
| 439 std::unique_ptr<ArcAppListPrefs::PackageInfo> package( | 439 std::unique_ptr<ArcAppListPrefs::PackageInfo> package( |
| 440 prefs_->GetPackage(package_name)); | 440 prefs_->GetPackage(package_name)); |
| 441 DCHECK(package.get()); | 441 DCHECK(package.get()); |
| 442 return package->should_sync; | 442 return package->should_sync; |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace arc | 445 } // namespace arc |
| OLD | NEW |