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 "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "chrome/browser/apps/drive/drive_app_provider.h" | 9 #include "chrome/browser/apps/drive/drive_app_provider.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 id == extensions::kWebStoreAppId) | 114 id == extensions::kWebStoreAppId) |
115 return true; | 115 return true; |
116 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
117 if (id == file_manager::kFileManagerAppId || id == genius_app::kGeniusAppId) | 117 if (id == file_manager::kFileManagerAppId || id == genius_app::kGeniusAppId) |
118 return true; | 118 return true; |
119 #endif | 119 #endif |
120 return false; | 120 return false; |
121 } | 121 } |
122 | 122 |
123 void UninstallExtension(ExtensionService* service, const std::string& id) { | 123 void UninstallExtension(ExtensionService* service, const std::string& id) { |
124 if (service && service->GetInstalledExtension(id)) { | 124 if (service) { |
125 service->UninstallExtension(id, | 125 ExtensionService::UninstallExtensionHelper( |
126 extensions::UNINSTALL_REASON_SYNC, | 126 service, id, extensions::UNINSTALL_REASON_SYNC); |
127 base::Bind(&base::DoNothing), | |
128 NULL); | |
129 } | 127 } |
130 } | 128 } |
131 | 129 |
132 bool GetAppListItemType(AppListItem* item, | 130 bool GetAppListItemType(AppListItem* item, |
133 sync_pb::AppListSpecifics::AppListItemType* type) { | 131 sync_pb::AppListSpecifics::AppListItemType* type) { |
134 const char* item_type = item->GetItemType(); | 132 const char* item_type = item->GetItemType(); |
135 if (item_type == ExtensionAppItem::kItemType) { | 133 if (item_type == ExtensionAppItem::kItemType) { |
136 *type = sync_pb::AppListSpecifics::TYPE_APP; | 134 *type = sync_pb::AppListSpecifics::TYPE_APP; |
137 } else if (item_type == AppListFolderItem::kItemType) { | 135 } else if (item_type == AppListFolderItem::kItemType) { |
138 *type = sync_pb::AppListSpecifics::TYPE_FOLDER; | 136 *type = sync_pb::AppListSpecifics::TYPE_FOLDER; |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 } else { | 994 } else { |
997 res += " { " + item_name + " }"; | 995 res += " { " + item_name + " }"; |
998 res += " [" + item_ordinal.ToDebugString() + "]"; | 996 res += " [" + item_ordinal.ToDebugString() + "]"; |
999 if (!parent_id.empty()) | 997 if (!parent_id.empty()) |
1000 res += " <" + parent_id.substr(0, 8) + ">"; | 998 res += " <" + parent_id.substr(0, 8) + ">"; |
1001 } | 999 } |
1002 return res; | 1000 return res; |
1003 } | 1001 } |
1004 | 1002 |
1005 } // namespace app_list | 1003 } // namespace app_list |
OLD | NEW |