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/apps/drive/drive_app_provider.h" | 8 #include "chrome/browser/apps/drive/drive_app_provider.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 return true; | 109 return true; |
110 #if defined(OS_CHROMEOS) | 110 #if defined(OS_CHROMEOS) |
111 if (id == genius_app::kGeniusAppId) | 111 if (id == genius_app::kGeniusAppId) |
112 return true; | 112 return true; |
113 #endif | 113 #endif |
114 return false; | 114 return false; |
115 } | 115 } |
116 | 116 |
117 void UninstallExtension(ExtensionService* service, const std::string& id) { | 117 void UninstallExtension(ExtensionService* service, const std::string& id) { |
118 if (service && service->GetInstalledExtension(id)) | 118 if (service && service->GetInstalledExtension(id)) |
119 service->UninstallExtension(id, false, NULL); | 119 service->UninstallExtension( |
| 120 id, ExtensionService::UNINSTALL_REASON_SYNC, NULL); |
120 } | 121 } |
121 | 122 |
122 bool GetAppListItemType(AppListItem* item, | 123 bool GetAppListItemType(AppListItem* item, |
123 sync_pb::AppListSpecifics::AppListItemType* type) { | 124 sync_pb::AppListSpecifics::AppListItemType* type) { |
124 const char* item_type = item->GetItemType(); | 125 const char* item_type = item->GetItemType(); |
125 if (item_type == ExtensionAppItem::kItemType) { | 126 if (item_type == ExtensionAppItem::kItemType) { |
126 *type = sync_pb::AppListSpecifics::TYPE_APP; | 127 *type = sync_pb::AppListSpecifics::TYPE_APP; |
127 } else if (item_type == AppListFolderItem::kItemType) { | 128 } else if (item_type == AppListFolderItem::kItemType) { |
128 *type = sync_pb::AppListSpecifics::TYPE_FOLDER; | 129 *type = sync_pb::AppListSpecifics::TYPE_FOLDER; |
129 } else { | 130 } else { |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 } else { | 905 } else { |
905 res += " { " + item_name + " }"; | 906 res += " { " + item_name + " }"; |
906 res += " [" + item_ordinal.ToDebugString() + "]"; | 907 res += " [" + item_ordinal.ToDebugString() + "]"; |
907 if (!parent_id.empty()) | 908 if (!parent_id.empty()) |
908 res += " <" + parent_id.substr(0, 8) + ">"; | 909 res += " <" + parent_id.substr(0, 8) + ">"; |
909 } | 910 } |
910 return res; | 911 return res; |
911 } | 912 } |
912 | 913 |
913 } // namespace app_list | 914 } // namespace app_list |
OLD | NEW |