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 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 syncer::SyncData GetSyncDataFromSyncItem( | 87 syncer::SyncData GetSyncDataFromSyncItem( |
88 const AppListSyncableService::SyncItem* item) { | 88 const AppListSyncableService::SyncItem* item) { |
89 sync_pb::EntitySpecifics specifics; | 89 sync_pb::EntitySpecifics specifics; |
90 GetSyncSpecificsFromSyncItem(item, specifics.mutable_app_list()); | 90 GetSyncSpecificsFromSyncItem(item, specifics.mutable_app_list()); |
91 return syncer::SyncData::CreateLocalData(item->item_id, | 91 return syncer::SyncData::CreateLocalData(item->item_id, |
92 item->item_id, | 92 item->item_id, |
93 specifics); | 93 specifics); |
94 } | 94 } |
95 | 95 |
96 bool AppIsDefault(ExtensionService* service, const std::string& id) { | 96 bool AppIsDefault(ExtensionService* service, const std::string& id) { |
97 return service && service->extension_prefs()->WasInstalledByDefault(id); | 97 return service && extensions::ExtensionPrefs::Get(service->profile()) |
| 98 ->WasInstalledByDefault(id); |
98 } | 99 } |
99 | 100 |
100 void UninstallExtension(ExtensionService* service, const std::string& id) { | 101 void UninstallExtension(ExtensionService* service, const std::string& id) { |
101 if (service && service->GetInstalledExtension(id)) | 102 if (service && service->GetInstalledExtension(id)) |
102 service->UninstallExtension(id, false, NULL); | 103 service->UninstallExtension(id, false, NULL); |
103 } | 104 } |
104 | 105 |
105 bool GetAppListItemType(AppListItem* item, | 106 bool GetAppListItemType(AppListItem* item, |
106 sync_pb::AppListSpecifics::AppListItemType* type) { | 107 sync_pb::AppListSpecifics::AppListItemType* type) { |
107 const char* item_type = item->GetItemType(); | 108 const char* item_type = item->GetItemType(); |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 } else { | 721 } else { |
721 res += " { " + item_name + " }"; | 722 res += " { " + item_name + " }"; |
722 res += " [" + item_ordinal.ToDebugString() + "]"; | 723 res += " [" + item_ordinal.ToDebugString() + "]"; |
723 if (!parent_id.empty()) | 724 if (!parent_id.empty()) |
724 res += " <" + parent_id.substr(0, 8) + ">"; | 725 res += " <" + parent_id.substr(0, 8) + ">"; |
725 } | 726 } |
726 return res; | 727 return res; |
727 } | 728 } |
728 | 729 |
729 } // namespace app_list | 730 } // namespace app_list |
OLD | NEW |