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

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

Issue 345023: Get rid of MessageLoop* caching in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_message_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_message_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698