Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 1130353010: Remove deprecated ExtensionService::GetInstalledExtension() usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed if to iff Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc ('k') | chrome/browser/ui/app_list/extension_app_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698