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

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

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issue exposed by failing unit test. Created 6 years, 5 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 "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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_unittest.cc ('k') | chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698