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

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

Issue 2416133002: Implement local storage for App List in case app sync is off. (Closed)
Patch Set: comments addressed 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/app_list_syncable_service.h
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.h b/chrome/browser/ui/app_list/app_list_syncable_service.h
index 7900f3f664833b85aa6288a0a3d50d218c706599..32649f3ecbbbea6035af63cb71e4718b8d261adf 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.h
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.h
@@ -39,6 +39,10 @@ namespace sync_pb {
class AppListSpecifics;
}
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
namespace app_list {
class AppListFolderItem;
@@ -81,6 +85,9 @@ class AppListSyncableService : public syncer::SyncableService,
~AppListSyncableService() override;
+ // Registers prefs to support local storage.
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
// Adds |item| to |sync_items_| and |model_|. If a sync item already exists,
// updates the existing sync item instead.
void AddItem(std::unique_ptr<AppListItem> app_item);
@@ -229,6 +236,10 @@ class AppListSyncableService : public syncer::SyncableService,
// an OEM (extension->was_installed_by_oem() is true).
bool AppIsOem(const std::string& id);
+ // Initializes sync items from the local storage while sync service is not
+ // enabled.
+ void InitFromLocalStorage();
+
// Helper that notifies observers that sync model has been updated.
void NotifyObserversSyncUpdated();

Powered by Google App Engine
This is Rietveld 408576698