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

Unified Diff: chrome/browser/extensions/extension_uninstall_ui.cc

Issue 7920023: Fix crashes related to the extension uninstall dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_uninstall_ui.cc
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.cc b/chrome/browser/extensions/extension_uninstall_ui.cc
similarity index 72%
copy from chrome/browser/extensions/extension_uninstall_dialog.cc
copy to chrome/browser/extensions/extension_uninstall_ui.cc
index ef1e3bcfd86b3600d2add5f238b49094c080bbb2..31b75bd9062048c57831dcefac2580b6ca56dddd 100644
--- a/chrome/browser/extensions/extension_uninstall_dialog.cc
+++ b/chrome/browser/extensions/extension_uninstall_ui.cc
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/extension_uninstall_dialog.h"
+#include "chrome/browser/extensions/extension_uninstall_ui.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "chrome/browser/extensions/extension_uninstall_dialog.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_icon_set.h"
@@ -17,19 +18,17 @@
// Size of extension icon in top left of dialog.
static const int kIconSize = 69;
-ExtensionUninstallDialog::ExtensionUninstallDialog(Profile* profile)
+ExtensionUninstallUI::ExtensionUninstallUI(Profile* profile)
: profile_(profile),
ui_loop_(MessageLoop::current()),
delegate_(NULL),
extension_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(tracker_(this)) {
-}
+ ALLOW_THIS_IN_INITIALIZER_LIST(tracker_(this)) {}
-ExtensionUninstallDialog::~ExtensionUninstallDialog() {
-}
+ExtensionUninstallUI::~ExtensionUninstallUI() {}
-void ExtensionUninstallDialog::ConfirmUninstall(Delegate* delegate,
- const Extension* extension) {
+void ExtensionUninstallUI::ConfirmUninstall(Delegate* delegate,
+ const Extension* extension) {
DCHECK(ui_loop_ == MessageLoop::current());
delegate_ = delegate;
extension_ = extension;
@@ -43,7 +42,7 @@ void ExtensionUninstallDialog::ConfirmUninstall(Delegate* delegate,
ImageLoadingTracker::DONT_CACHE);
}
-void ExtensionUninstallDialog::SetIcon(SkBitmap* image) {
+void ExtensionUninstallUI::SetIcon(SkBitmap* image) {
if (image)
icon_ = *image;
else
@@ -59,10 +58,9 @@ void ExtensionUninstallDialog::SetIcon(SkBitmap* image) {
}
}
-void ExtensionUninstallDialog::OnImageLoaded(SkBitmap* image,
- const ExtensionResource& resource,
- int index) {
+void ExtensionUninstallUI::OnImageLoaded(SkBitmap* image,
+ const ExtensionResource& resource,
+ int index) {
SetIcon(image);
-
- Show(profile_, delegate_, extension_, &icon_);
+ ShowDialog();
}

Powered by Google App Engine
This is Rietveld 408576698