| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 id == extension_misc::kWebStoreAppId) | 110 id == extension_misc::kWebStoreAppId) |
| 111 return true; | 111 return true; |
| 112 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) |
| 113 if (id == file_manager::kFileManagerAppId || id == genius_app::kGeniusAppId) | 113 if (id == file_manager::kFileManagerAppId || id == genius_app::kGeniusAppId) |
| 114 return true; | 114 return true; |
| 115 #endif | 115 #endif |
| 116 return false; | 116 return false; |
| 117 } | 117 } |
| 118 | 118 |
| 119 void UninstallExtension(ExtensionService* service, const std::string& id) { | 119 void UninstallExtension(ExtensionService* service, const std::string& id) { |
| 120 if (service && service->GetInstalledExtension(id)) | 120 if (service && service->GetInstalledExtension(id)) { |
| 121 service->UninstallExtension(id, extensions::UNINSTALL_REASON_SYNC, NULL); | 121 service->UninstallExtension(id, |
| 122 extensions::UNINSTALL_REASON_SYNC, |
| 123 base::Bind(&base::DoNothing), |
| 124 NULL); |
| 125 } |
| 122 } | 126 } |
| 123 | 127 |
| 124 bool GetAppListItemType(AppListItem* item, | 128 bool GetAppListItemType(AppListItem* item, |
| 125 sync_pb::AppListSpecifics::AppListItemType* type) { | 129 sync_pb::AppListSpecifics::AppListItemType* type) { |
| 126 const char* item_type = item->GetItemType(); | 130 const char* item_type = item->GetItemType(); |
| 127 if (item_type == ExtensionAppItem::kItemType) { | 131 if (item_type == ExtensionAppItem::kItemType) { |
| 128 *type = sync_pb::AppListSpecifics::TYPE_APP; | 132 *type = sync_pb::AppListSpecifics::TYPE_APP; |
| 129 } else if (item_type == AppListFolderItem::kItemType) { | 133 } else if (item_type == AppListFolderItem::kItemType) { |
| 130 *type = sync_pb::AppListSpecifics::TYPE_FOLDER; | 134 *type = sync_pb::AppListSpecifics::TYPE_FOLDER; |
| 131 } else { | 135 } else { |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 } else { | 911 } else { |
| 908 res += " { " + item_name + " }"; | 912 res += " { " + item_name + " }"; |
| 909 res += " [" + item_ordinal.ToDebugString() + "]"; | 913 res += " [" + item_ordinal.ToDebugString() + "]"; |
| 910 if (!parent_id.empty()) | 914 if (!parent_id.empty()) |
| 911 res += " <" + parent_id.substr(0, 8) + ">"; | 915 res += " <" + parent_id.substr(0, 8) + ">"; |
| 912 } | 916 } |
| 913 return res; | 917 return res; |
| 914 } | 918 } |
| 915 | 919 |
| 916 } // namespace app_list | 920 } // namespace app_list |
| OLD | NEW |