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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_model_builder.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/arc/arc_app_model_builder.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_model_builder.cc b/chrome/browser/ui/app_list/arc/arc_app_model_builder.cc
index b10e01bcb3e701829f7a7244bee98b8e5f449b63..1d6f133d58c00bca5351776217091574a3c77669 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_model_builder.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_model_builder.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/app_list/arc/arc_app_model_builder.h"
#include "base/memory/ptr_util.h"
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/arc/arc_app_item.h"
@@ -52,7 +53,11 @@ void ArcAppModelBuilder::OnAppRegistered(
}
void ArcAppModelBuilder::OnAppRemoved(const std::string& app_id) {
- RemoveApp(app_id);
+ const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get();
+ DCHECK(auth_service);
+ // Don't sync app removal in case it was caused by disabling Arc.
+ const bool unsynced_change = !auth_service->IsArcEnabled();
+ RemoveApp(app_id, unsynced_change);
}
void ArcAppModelBuilder::OnAppIconUpdated(const std::string& app_id,
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service.cc ('k') | chrome/browser/ui/app_list/extension_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698