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

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

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 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu_contro ller.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu_contro ller.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 8 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
9 #include "chrome/browser/extensions/extension_action_manager.h" 9 #include "chrome/browser/extensions/extension_action_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 profile_(browser->profile()) { 45 profile_(browser->profile()) {
46 extension_uninstall_dialog_.reset( 46 extension_uninstall_dialog_.reset(
47 extensions::ExtensionUninstallDialog::Create(profile_, browser, this)); 47 extensions::ExtensionUninstallDialog::Create(profile_, browser, this));
48 extension_uninstall_dialog_->ConfirmUninstall(extension_); 48 extension_uninstall_dialog_->ConfirmUninstall(extension_);
49 } 49 }
50 50
51 virtual ~AsyncUninstaller() {} 51 virtual ~AsyncUninstaller() {}
52 52
53 // ExtensionUninstallDialog::Delegate: 53 // ExtensionUninstallDialog::Delegate:
54 virtual void ExtensionUninstallAccepted() OVERRIDE { 54 virtual void ExtensionUninstallAccepted() OVERRIDE {
55 extensions::ExtensionSystem::Get(profile_)->extension_service()-> 55 extensions::ExtensionSystem::Get(profile_)
56 UninstallExtension(extension_->id(), false, NULL); 56 ->extension_service()
57 ->UninstallExtension(extension_->id(),
58 ExtensionService::UNINSTALL_REASON_USER_INITIATED,
59 NULL);
57 } 60 }
58 virtual void ExtensionUninstallCanceled() OVERRIDE {} 61 virtual void ExtensionUninstallCanceled() OVERRIDE {}
59 62
60 private: 63 private:
61 // The extension that's being uninstalled. 64 // The extension that's being uninstalled.
62 const Extension* extension_; 65 const Extension* extension_;
63 66
64 // The current profile. Weak. 67 // The current profile. Weak.
65 Profile* profile_; 68 Profile* profile_;
66 69
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return; 221 return;
219 222
220 [ExtensionPopupController showURL:url 223 [ExtensionPopupController showURL:url
221 inBrowser:browser_ 224 inBrowser:browser_
222 anchoredAt:popupPoint 225 anchoredAt:popupPoint
223 arrowLocation:info_bubble::kTopRight 226 arrowLocation:info_bubble::kTopRight
224 devMode:YES]; 227 devMode:YES];
225 } 228 }
226 229
227 @end 230 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698