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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs.h

Issue 2389763003: arc: Fix race when arc package sync service starts. (Closed)
Patch Set: Add Check in case ArcAppListPrefs gets deleted early. Created 4 years, 2 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_list_prefs.h
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
index a13aeb43554a5c47637f673aef2cc1cc3e022545..3676222f01327449914d171478f69378cb2b87e5 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
@@ -137,6 +137,8 @@ class ArcAppListPrefs
const arc::mojom::ArcPackageInfo& package_info) {}
// Notifies that package has been uninstalled.
virtual void OnPackageRemoved(const std::string& package_name) {}
+ // Notifies sync date type controller the model is ready to start.
+ virtual void OnPackageListInitialRefreshed() {}
virtual void OnTaskOrientationLockRequested(
int32_t task_id,
@@ -232,6 +234,10 @@ class ArcAppListPrefs
return app_instance_holder_;
}
+ bool package_list_initial_refreshed() const {
+ return package_list_initial_refreshed_;
+ }
+
std::unordered_set<std::string> GetAppsForPackage(
const std::string& package_name) const;
@@ -359,6 +365,8 @@ class ArcAppListPrefs
bool is_initialized_ = false;
// True if apps were restored.
bool apps_restored_ = false;
+ // True is Arc package list has been refreshed once.
+ bool package_list_initial_refreshed_ = false;
arc::ArcPackageSyncableService* sync_service_;
« no previous file with comments | « chrome/browser/sync/test/integration/sync_arc_package_helper.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698