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

Side by Side Diff: chrome/browser/ui/app_list/extension_uninstaller.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: Created 6 years, 7 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/extension_uninstaller.h" 5 #include "chrome/browser/ui/app_list/extension_uninstaller.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" 9 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
10 #include "extensions/browser/extension_system.h" 10 #include "extensions/browser/extension_system.h"
(...skipping 23 matching lines...) Expand all
34 dialog_.reset(ExtensionUninstallDialog::Create(profile_, NULL, this)); 34 dialog_.reset(ExtensionUninstallDialog::Create(profile_, NULL, this));
35 dialog_->ConfirmUninstall(extension); 35 dialog_->ConfirmUninstall(extension);
36 } 36 }
37 37
38 void ExtensionUninstaller::ExtensionUninstallAccepted() { 38 void ExtensionUninstaller::ExtensionUninstallAccepted() {
39 ExtensionService* service = 39 ExtensionService* service =
40 extensions::ExtensionSystem::Get(profile_)->extension_service(); 40 extensions::ExtensionSystem::Get(profile_)->extension_service();
41 const extensions::Extension* extension = 41 const extensions::Extension* extension =
42 service->GetInstalledExtension(app_id_); 42 service->GetInstalledExtension(app_id_);
43 if (extension) { 43 if (extension) {
44 service->UninstallExtension(app_id_, 44 service->UninstallExtension(
45 false, /* external_uninstall*/ 45 app_id_, ExtensionService::kUninstallReasonUserInitiated, NULL);
46 NULL);
47 } 46 }
48 controller_->OnCloseExtensionPrompt(); 47 controller_->OnCloseExtensionPrompt();
49 CleanUp(); 48 CleanUp();
50 } 49 }
51 50
52 void ExtensionUninstaller::ExtensionUninstallCanceled() { 51 void ExtensionUninstaller::ExtensionUninstallCanceled() {
53 controller_->OnCloseExtensionPrompt(); 52 controller_->OnCloseExtensionPrompt();
54 CleanUp(); 53 CleanUp();
55 } 54 }
56 55
57 void ExtensionUninstaller::CleanUp() { 56 void ExtensionUninstaller::CleanUp() {
58 delete this; 57 delete this;
59 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698