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

Side by Side Diff: chrome/browser/extensions/extension_disabled_ui.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 (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_disabled_ui.h" 5 #include "chrome/browser/extensions/extension_disabled_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 ExtensionUninstallDialog::Create(service_->profile(), browser, this)); 299 ExtensionUninstallDialog::Create(service_->profile(), browser, this));
300 // Delay showing the uninstall dialog, so that this function returns 300 // Delay showing the uninstall dialog, so that this function returns
301 // immediately, to close the bubble properly. See crbug.com/121544. 301 // immediately, to close the bubble properly. See crbug.com/121544.
302 base::MessageLoop::current()->PostTask(FROM_HERE, 302 base::MessageLoop::current()->PostTask(FROM_HERE,
303 base::Bind(&ExtensionUninstallDialog::ConfirmUninstall, 303 base::Bind(&ExtensionUninstallDialog::ConfirmUninstall,
304 uninstall_dialog_->AsWeakPtr(), extension_)); 304 uninstall_dialog_->AsWeakPtr(), extension_));
305 #endif // !defined(OS_ANDROID) 305 #endif // !defined(OS_ANDROID)
306 } 306 }
307 307
308 void ExtensionDisabledGlobalError::ExtensionUninstallAccepted() { 308 void ExtensionDisabledGlobalError::ExtensionUninstallAccepted() {
309 service_->UninstallExtension(extension_->id(), false, NULL); 309 service_->UninstallExtension(
310 extension_->id(),
311 ExtensionService::kUninstallReasonUserInitiated,
Devlin 2014/05/14 23:14:20 Looking at this more, maybe we want to differentia
rpaquay 2014/06/30 23:16:18 I created a new enum entry for this case.
312 NULL);
310 } 313 }
311 314
312 void ExtensionDisabledGlobalError::ExtensionUninstallCanceled() { 315 void ExtensionDisabledGlobalError::ExtensionUninstallCanceled() {
313 // Nothing happens, and the error is still there. 316 // Nothing happens, and the error is still there.
314 } 317 }
315 318
316 void ExtensionDisabledGlobalError::Observe( 319 void ExtensionDisabledGlobalError::Observe(
317 int type, 320 int type,
318 const content::NotificationSource& source, 321 const content::NotificationSource& source,
319 const content::NotificationDetails& details) { 322 const content::NotificationDetails& details) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 void ShowExtensionDisabledDialog(ExtensionService* service, 372 void ShowExtensionDisabledDialog(ExtensionService* service,
370 content::WebContents* web_contents, 373 content::WebContents* web_contents,
371 const Extension* extension) { 374 const Extension* extension) {
372 scoped_ptr<ExtensionInstallPrompt> install_ui( 375 scoped_ptr<ExtensionInstallPrompt> install_ui(
373 new ExtensionInstallPrompt(web_contents)); 376 new ExtensionInstallPrompt(web_contents));
374 // This object manages its own lifetime. 377 // This object manages its own lifetime.
375 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); 378 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension);
376 } 379 }
377 380
378 } // namespace extensions 381 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698