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

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: 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 (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 <bitset> 7 #include <bitset>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 358 }
359 359
360 bool ExtensionDisabledGlobalError::ShouldCloseOnDeactivate() const { 360 bool ExtensionDisabledGlobalError::ShouldCloseOnDeactivate() const {
361 // Since this indicates that an extension was disabled, we should definitely 361 // Since this indicates that an extension was disabled, we should definitely
362 // have the user acknowledge it, rather than having the bubble disappear when 362 // have the user acknowledge it, rather than having the bubble disappear when
363 // a new window pops up. 363 // a new window pops up.
364 return false; 364 return false;
365 } 365 }
366 366
367 void ExtensionDisabledGlobalError::ExtensionUninstallAccepted() { 367 void ExtensionDisabledGlobalError::ExtensionUninstallAccepted() {
368 service_->UninstallExtension(extension_->id(), false, NULL); 368 service_->UninstallExtension(
369 extension_->id(),
370 ExtensionService::UNINSTALL_REASON_EXTENSION_DISABLED,
371 NULL);
369 } 372 }
370 373
371 void ExtensionDisabledGlobalError::ExtensionUninstallCanceled() { 374 void ExtensionDisabledGlobalError::ExtensionUninstallCanceled() {
372 // Nothing happens, and the error is still there. 375 // Nothing happens, and the error is still there.
373 } 376 }
374 377
375 void ExtensionDisabledGlobalError::Observe( 378 void ExtensionDisabledGlobalError::Observe(
376 int type, 379 int type,
377 const content::NotificationSource& source, 380 const content::NotificationSource& source,
378 const content::NotificationDetails& details) { 381 const content::NotificationDetails& details) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 void ShowExtensionDisabledDialog(ExtensionService* service, 437 void ShowExtensionDisabledDialog(ExtensionService* service,
435 content::WebContents* web_contents, 438 content::WebContents* web_contents,
436 const Extension* extension) { 439 const Extension* extension) {
437 scoped_ptr<ExtensionInstallPrompt> install_ui( 440 scoped_ptr<ExtensionInstallPrompt> install_ui(
438 new ExtensionInstallPrompt(web_contents)); 441 new ExtensionInstallPrompt(web_contents));
439 // This object manages its own lifetime. 442 // This object manages its own lifetime.
440 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); 443 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension);
441 } 444 }
442 445
443 } // namespace extensions 446 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698