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

Side by Side Diff: trunk/src/chrome/browser/extensions/extension_context_menu_model.cc

Issue 369863002: Revert 281130 "Replace "external_install" boolean parameter with..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/extension_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 9 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 break; 137 break;
138 } 138 }
139 default: 139 default:
140 NOTREACHED() << "Unknown option"; 140 NOTREACHED() << "Unknown option";
141 break; 141 break;
142 } 142 }
143 } 143 }
144 144
145 void ExtensionContextMenuModel::ExtensionUninstallAccepted() { 145 void ExtensionContextMenuModel::ExtensionUninstallAccepted() {
146 if (GetExtension()) { 146 if (GetExtension()) {
147 extensions::ExtensionSystem::Get(profile_) 147 extensions::ExtensionSystem::Get(profile_)->extension_service()->
148 ->extension_service() 148 UninstallExtension(extension_id_, false, NULL);
149 ->UninstallExtension(extension_id_,
150 ExtensionService::UNINSTALL_REASON_USER_INITIATED,
151 NULL);
152 } 149 }
153 Release(); 150 Release();
154 } 151 }
155 152
156 void ExtensionContextMenuModel::ExtensionUninstallCanceled() { 153 void ExtensionContextMenuModel::ExtensionUninstallCanceled() {
157 Release(); 154 Release();
158 } 155 }
159 156
160 ExtensionContextMenuModel::~ExtensionContextMenuModel() {} 157 ExtensionContextMenuModel::~ExtensionContextMenuModel() {}
161 158
(...skipping 18 matching lines...) Expand all
180 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON); 177 AddItemWithStringId(HIDE, IDS_EXTENSIONS_HIDE_BUTTON);
181 AddSeparator(ui::NORMAL_SEPARATOR); 178 AddSeparator(ui::NORMAL_SEPARATOR);
182 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION); 179 AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION);
183 } 180 }
184 181
185 const Extension* ExtensionContextMenuModel::GetExtension() const { 182 const Extension* ExtensionContextMenuModel::GetExtension() const {
186 ExtensionService* extension_service = 183 ExtensionService* extension_service =
187 extensions::ExtensionSystem::Get(profile_)->extension_service(); 184 extensions::ExtensionSystem::Get(profile_)->extension_service();
188 return extension_service->GetExtensionById(extension_id_, false); 185 return extension_service->GetExtensionById(extension_id_, false);
189 } 186 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698