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 #include "base/prefs/pref_service.h" | |
6 #include "base/prefs/scoped_user_pref_update.h" | |
7 #include "chrome/browser/ui/app_list/app_list_prefs.h" | 5 #include "chrome/browser/ui/app_list/app_list_prefs.h" |
8 #include "chrome/browser/ui/app_list/app_list_prefs_factory.h" | 6 #include "chrome/browser/ui/app_list/app_list_prefs_factory.h" |
9 #include "components/pref_registry/pref_registry_syncable.h" | 7 #include "components/pref_registry/pref_registry_syncable.h" |
| 8 #include "components/prefs/pref_service.h" |
| 9 #include "components/prefs/scoped_user_pref_update.h" |
10 | 10 |
11 namespace app_list { | 11 namespace app_list { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // App list ordering and folder data. | 15 // App list ordering and folder data. |
16 const char kPrefModel[] = "app_list.model"; | 16 const char kPrefModel[] = "app_list.model"; |
17 | 17 |
18 const char kModelItemPosition[] = "position"; | 18 const char kModelItemPosition[] = "position"; |
19 const char kModelItemType[] = "item_type"; | 19 const char kModelItemType[] = "item_type"; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 (*out)[it.key()] = *AppListInfo::CreateAppListInfoFromDict(item_dict); | 118 (*out)[it.key()] = *AppListInfo::CreateAppListInfoFromDict(item_dict); |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 void AppListPrefs::DeleteAppListInfo(const std::string& id) { | 122 void AppListPrefs::DeleteAppListInfo(const std::string& id) { |
123 DictionaryPrefUpdate model_dict(pref_service_, kPrefModel); | 123 DictionaryPrefUpdate model_dict(pref_service_, kPrefModel); |
124 model_dict->Remove(id, NULL); | 124 model_dict->Remove(id, NULL); |
125 } | 125 } |
126 | 126 |
127 } // namespace app_list | 127 } // namespace app_list |
OLD | NEW |