| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 using SyncItemMap = std::map<std::string, std::unique_ptr<SyncItem>>; | 80 using SyncItemMap = std::map<std::string, std::unique_ptr<SyncItem>>; |
| 81 | 81 |
| 82 // Populates the model when |extension_system| is ready. | 82 // Populates the model when |extension_system| is ready. |
| 83 AppListSyncableService(Profile* profile, | 83 AppListSyncableService(Profile* profile, |
| 84 extensions::ExtensionSystem* extension_system); | 84 extensions::ExtensionSystem* extension_system); |
| 85 | 85 |
| 86 ~AppListSyncableService() override; | 86 ~AppListSyncableService() override; |
| 87 | 87 |
| 88 static const char kOemFolderId[]; |
| 89 |
| 88 // Registers prefs to support local storage. | 90 // Registers prefs to support local storage. |
| 89 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 91 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 90 | 92 |
| 91 // Adds |item| to |sync_items_| and |model_|. If a sync item already exists, | 93 // Adds |item| to |sync_items_| and |model_|. If a sync item already exists, |
| 92 // updates the existing sync item instead. | 94 // updates the existing sync item instead. |
| 93 void AddItem(std::unique_ptr<AppListItem> app_item); | 95 void AddItem(std::unique_ptr<AppListItem> app_item); |
| 94 | 96 |
| 95 // Removes sync item matching |id|. | 97 // Removes sync item matching |id|. |
| 96 void RemoveItem(const std::string& id); | 98 void RemoveItem(const std::string& id); |
| 97 | 99 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 std::unique_ptr<DriveAppProvider> drive_app_provider_; | 278 std::unique_ptr<DriveAppProvider> drive_app_provider_; |
| 277 | 279 |
| 278 base::WeakPtrFactory<AppListSyncableService> weak_ptr_factory_; | 280 base::WeakPtrFactory<AppListSyncableService> weak_ptr_factory_; |
| 279 | 281 |
| 280 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); | 282 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); |
| 281 }; | 283 }; |
| 282 | 284 |
| 283 } // namespace app_list | 285 } // namespace app_list |
| 284 | 286 |
| 285 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 287 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
| OLD | NEW |