Index: chrome/browser/extensions/extension_disabled_infobar_delegate.cc |
=================================================================== |
--- chrome/browser/extensions/extension_disabled_infobar_delegate.cc (revision 30521) |
+++ chrome/browser/extensions/extension_disabled_infobar_delegate.cc (working copy) |
@@ -25,8 +25,7 @@ |
ExtensionDisabledDialogDelegate(Profile* profile, |
ExtensionsService* service, |
Extension* extension) |
- : profile_(profile), service_(service), extension_(extension), |
- ui_loop_(MessageLoop::current()) { |
+ : profile_(profile), service_(service), extension_(extension) { |
AddRef(); // balanced in ContinueInstall or AbortInstall. |
// Do this now because we can't touch extension on the file loop. |
@@ -57,13 +56,14 @@ |
FilePath install_icon_path = install_icon_resource_.GetFilePath(); |
CrxInstaller::DecodeInstallIcon(install_icon_path, &install_icon_); |
// Then we display the UI on the UI thread. |
- ui_loop_->PostTask(FROM_HERE, |
- NewRunnableMethod(this, |
- &ExtensionDisabledDialogDelegate::ConfirmInstall)); |
+ ChromeThread::PostTask( |
+ ChromeThread::UI, FROM_HERE, |
+ NewRunnableMethod( |
+ this, &ExtensionDisabledDialogDelegate::ConfirmInstall)); |
} |
void ConfirmInstall() { |
- DCHECK(MessageLoop::current() == ui_loop_); |
+ DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); |
ExtensionInstallUI ui(profile_); |
ui.ConfirmInstall(this, extension_, install_icon_.get()); |
} |
@@ -73,7 +73,6 @@ |
Extension* extension_; |
ExtensionResource install_icon_resource_; |
scoped_ptr<SkBitmap> install_icon_; |
- MessageLoop* ui_loop_; |
}; |
class ExtensionDisabledInfobarDelegate |