Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc

Issue 2242313002: Fix sync related issue with old container. Sync related issue when the user is running a version of… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 880ed652f64d664230d5aef8be5f6090de4dbca8..6e509800e8b3e84180774f4b81e7311f4ca18144 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
@@ -23,6 +23,8 @@ namespace {
using syncer::SyncChange;
using ArcSyncItem = ArcPackageSyncableService::SyncItem;
+constexpr int64_t kNoAndroidID = 0;
+
std::unique_ptr<ArcSyncItem> CreateSyncItemFromSyncSpecifics(
const sync_pb::ArcPackageSpecifics& specifics) {
return base::MakeUnique<ArcSyncItem>(
@@ -266,6 +268,13 @@ void ArcPackageSyncableService::OnPackageInstalled(
// Pending install item. Confirm install.
if (install_iter != pending_install_items_.end()) {
+ if (install_iter->second->last_backup_android_id == kNoAndroidID &&
+ package_info.last_backup_android_id != kNoAndroidID) {
+ pending_install_items_.erase(install_iter);
+ SendSyncChange(package_info, SyncChange::ACTION_UPDATE);
+ return;
+ }
+
sync_items_[package_name] = std::move(install_iter->second);
pending_install_items_.erase(install_iter);
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698