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

Unified Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 2317523003: [Merge-M54] arc: Don't sync app list change caused by Arc opt out. (Closed)
Patch Set: Created 4 years, 3 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
Index: chrome/browser/ui/app_list/app_list_syncable_service.cc
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.cc b/chrome/browser/ui/app_list/app_list_syncable_service.cc
index 97db26e0bff4e6158be83de2c0e6fe3c12ebb34f..4a88c66f8cac21b3bfae6b3ecca770f665ba8164 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc
@@ -37,6 +37,7 @@
#include "ui/base/l10n/l10n_util.h"
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
#include "chrome/browser/chromeos/file_manager/app_id.h"
#include "chrome/browser/chromeos/genius_app/app_id.h"
#include "chrome/browser/ui/app_list/arc/arc_app_item.h"
@@ -219,6 +220,17 @@ class AppListSyncableService::ModelObserver : public AppListModelObserver {
// deleted when the last item is removed (in PruneEmptySyncFolders()).
if (item->GetItemType() == AppListFolderItem::kItemType)
return;
+
+#if defined(OS_CHROMEOS)
+ if (item->GetItemType() == ArcAppItem::kItemType) {
+ // Don't sync remove changes coming as result of disabling Arc.
+ const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get();
+ DCHECK(auth_service);
+ if (!auth_service->IsArcEnabled())
+ return;
+ }
+#endif
+
owner_->RemoveSyncItem(item->id());
}
« no previous file with comments | « chrome/browser/ui/app_list/app_list_model_builder.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698