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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm

Issue 9960087: Revert 13676 - Revert 131665 - Add a preference for why an extension is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_tab_util.h" 9 #include "chrome/browser/extensions/extension_tab_util.h"
10 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 10 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 case kExtensionContextOptions: { 255 case kExtensionContextOptions: {
256 DCHECK(!extension_->options_url().is_empty()); 256 DCHECK(!extension_->options_url().is_empty());
257 profile_->GetExtensionProcessManager()->OpenOptionsPage(extension_, 257 profile_->GetExtensionProcessManager()->OpenOptionsPage(extension_,
258 browser); 258 browser);
259 break; 259 break;
260 } 260 }
261 case kExtensionContextDisable: { 261 case kExtensionContextDisable: {
262 ExtensionService* extensionService = profile_->GetExtensionService(); 262 ExtensionService* extensionService = profile_->GetExtensionService();
263 if (!extensionService) 263 if (!extensionService)
264 return; // Incognito mode. 264 return; // Incognito mode.
265 extensionService->DisableExtension(extension_->id()); 265 extensionService->DisableExtension(extension_->id(),
266 Extension::DISABLE_USER_ACTION);
266 break; 267 break;
267 } 268 }
268 case kExtensionContextUninstall: { 269 case kExtensionContextUninstall: {
269 uninstaller_.reset(new AsyncUninstaller(extension_, profile_)); 270 uninstaller_.reset(new AsyncUninstaller(extension_, profile_));
270 break; 271 break;
271 } 272 }
272 case kExtensionContextHide: { 273 case kExtensionContextHide: {
273 ExtensionService* extension_service = profile_->GetExtensionService(); 274 ExtensionService* extension_service = profile_->GetExtensionService();
274 extension_service->SetBrowserActionVisibility(extension_, false); 275 extension_service->SetBrowserActionVisibility(extension_, false);
275 break; 276 break;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 326 }
326 return YES; 327 return YES;
327 } 328 }
328 329
329 - (void)invalidateProfile { 330 - (void)invalidateProfile {
330 observer_.reset(); 331 observer_.reset();
331 profile_ = NULL; 332 profile_ = NULL;
332 } 333 }
333 334
334 @end 335 @end
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_extension_helper.cc ('k') | chrome/browser/ui/panels/panel_settings_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698