| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PREFS_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_PREFS_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_PREFS_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_PREFS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 typedef std::map<std::string, AppListInfo> AppListInfoMap; | 65 typedef std::map<std::string, AppListInfo> AppListInfoMap; |
| 66 | 66 |
| 67 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 67 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 68 | 68 |
| 69 static AppListPrefs* Get(content::BrowserContext* context); | 69 static AppListPrefs* Get(content::BrowserContext* context); |
| 70 | 70 |
| 71 static AppListPrefs* Create(PrefService* pref_service); | 71 static AppListPrefs* Create(PrefService* pref_service); |
| 72 | 72 |
| 73 virtual ~AppListPrefs(); | 73 ~AppListPrefs() override; |
| 74 | 74 |
| 75 // Sets the app list info for |id|. | 75 // Sets the app list info for |id|. |
| 76 void SetAppListInfo(const std::string& id, const AppListInfo& info); | 76 void SetAppListInfo(const std::string& id, const AppListInfo& info); |
| 77 | 77 |
| 78 // Gets the app list info for |id|. | 78 // Gets the app list info for |id|. |
| 79 scoped_ptr<AppListInfo> GetAppListInfo(const std::string& id) const; | 79 scoped_ptr<AppListInfo> GetAppListInfo(const std::string& id) const; |
| 80 | 80 |
| 81 // Gets a map of all AppListInfo objects in the prefs. | 81 // Gets a map of all AppListInfo objects in the prefs. |
| 82 void GetAllAppListInfos(AppListInfoMap* out) const; | 82 void GetAllAppListInfos(AppListInfoMap* out) const; |
| 83 | 83 |
| 84 // Deletes the app list info for |id|. | 84 // Deletes the app list info for |id|. |
| 85 void DeleteAppListInfo(const std::string& id); | 85 void DeleteAppListInfo(const std::string& id); |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 explicit AppListPrefs(PrefService* pref_service); | 88 explicit AppListPrefs(PrefService* pref_service); |
| 89 | 89 |
| 90 PrefService* pref_service_; | 90 PrefService* pref_service_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(AppListPrefs); | 92 DISALLOW_COPY_AND_ASSIGN(AppListPrefs); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace app_list | 95 } // namespace app_list |
| 96 | 96 |
| 97 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_PREFS_H_ | 97 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_PREFS_H_ |
| OLD | NEW |