Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 39336)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 39337)
@@ -366,4 +366,5 @@
 	src/globals/UIActionPool.cpp \
 	src/globals/UIExtraDataEventHandler.cpp \
+	src/net/UIUpdateManager.cpp \
 	src/runtime/UIActionPoolRuntime.cpp \
 	src/runtime/UIIndicatorsPool.cpp \
Index: trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp	(revision 39336)
+++ trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp	(revision 39337)
@@ -52,14 +52,15 @@
 
 /* static */
-void UIDownloaderExtensionPack::download(QObject *pListener)
+UIDownloaderExtensionPack* UIDownloaderExtensionPack::create()
 {
-    /* Create and configure the Extension Pack downloader: */
-    UIDownloaderExtensionPack *pDownloader = new UIDownloaderExtensionPack;
-    pDownloader->setParentWidget(msgCenter().mainWindowShown());
-    /* After downloading finished => propose to install the Extension Pack: */
-    connect(pDownloader, SIGNAL(sigNotifyAboutExtensionPackDownloaded(const QString &, const QString &)),
-            pListener, SLOT(sltHandleDownloadedExtensionPack(const QString &, const QString &)));
-    /* Start downloading: */
-    pDownloader->start();
+    if (!m_pInstance)
+        m_pInstance = new UIDownloaderExtensionPack;
+    return m_pInstance;
+}
+
+/* static */
+UIDownloaderExtensionPack* UIDownloaderExtensionPack::current()
+{
+    return m_pInstance;
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h	(revision 39336)
+++ trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h	(revision 39337)
@@ -47,8 +47,11 @@
 public:
 
-    /* Returns updater if exists: */
-    static UIDownloaderExtensionPack* current() { return m_pInstance; }
-    /* Start downloading: */
-    static void download(QObject *pListener);
+    /* Create downloader: */
+    static UIDownloaderExtensionPack* create();
+    /* Return downloader: */
+    static UIDownloaderExtensionPack* current();
+
+    /* Starts downloading: */
+    void start();
 
 signals:
@@ -56,9 +59,4 @@
     /* Notify listeners about extension pack downloaded: */
     void sigNotifyAboutExtensionPackDownloaded(const QString &strSource, const QString &strTarget);
-
-protected:
-
-    /* Starts downloading: */
-    void start();
 
 private:
Index: trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp	(revision 39336)
+++ trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp	(revision 39337)
@@ -23,8 +23,9 @@
 #include <QTimer>
 #include <QDir>
-
+#include <QPointer>
 #include <VBox/version.h>
 
 /* Local includes: */
+#include "UIUpdateDefs.h"
 #include "UIUpdateManager.h"
 #include "UINetworkManager.h"
@@ -39,4 +40,288 @@
 using namespace VBoxGlobalDefs;
 
+/* Interface representing update step: */
+class UIUpdateStep : public QObject
+{
+    Q_OBJECT;
+
+public:
+
+    /* Constructor: */
+    UIUpdateStep()
+    {
+        /* Connect completion-signal of the step to the destruction-slot of the step: */
+        connect(this, SIGNAL(sigStepComplete()), this, SLOT(deleteLater()), Qt::QueuedConnection);
+    }
+
+signals:
+
+    /* Completion-signal of the step: */
+    void sigStepComplete();
+
+protected slots:
+
+    /* Starting-slot of the step: */
+    virtual void sltStartStep() = 0;
+};
+
+/* Queue for processing update steps: */
+class UIUpdateQueue : public QObject
+{
+    Q_OBJECT;
+
+public:
+
+    /* Constructor: */
+    UIUpdateQueue(UIUpdateManager *pParent) : QObject(pParent) {}
+
+    /* Enqueue passed-step with previously queued (if any) passed-steps: */
+    void add(UIUpdateStep *pStep)
+    {
+        /* Set 'this' as parent for passed step,
+         * that way passed-step could be cleaned-up in case of queue destruction: */
+        pStep->setParent(this);
+
+        /* If queue had no passed-steps yet: */
+        if (!m_pLastStep)
+        {
+            /* Connect starting-signal of the queue to starting-slot of the passed-step: */
+            connect(this, SIGNAL(sigStartQueue()), pStep, SLOT(sltStartStep()), Qt::QueuedConnection);
+        }
+        /* If queue already had at least one passed-step: */
+        else
+        {
+            /* Reconnect completion-signal of the last-step from completion-signal of the queue to starting-slot of the passed-step: */
+            disconnect(m_pLastStep, SIGNAL(sigStepComplete()), this, SIGNAL(sigQueueFinished()));
+            connect(m_pLastStep, SIGNAL(sigStepComplete()), pStep, SLOT(sltStartStep()), Qt::QueuedConnection);
+        }
+
+        /* Connect completion-signal of the passed-step to the completion-signal of the queue: */
+        connect(pStep, SIGNAL(sigStepComplete()), this, SIGNAL(sigQueueFinished()), Qt::QueuedConnection);
+
+        /* Remember last-step: */
+        m_pLastStep = pStep;
+    }
+
+    /* Starts a queue: */
+    void start()
+    {
+        /* Emit signal which starts queue: */
+        emit sigStartQueue();
+    }
+
+signals:
+
+    /* Starting-signal of the queue: */
+    void sigStartQueue();
+
+    /* Completion-signal of the queue: */
+    void sigQueueFinished();
+
+private:
+
+    /* Guarded pointer to the last passed-step: */
+    QPointer<UIUpdateStep> m_pLastStep;
+};
+
+/* Update step to check for the new VirtualBox version: */
+class UIUpdateStepVirtualBox : public UIUpdateStep
+{
+    Q_OBJECT;
+
+public:
+
+    /* Constructor: */
+    UIUpdateStepVirtualBox(bool fForceCall)
+        : m_url("http://update.virtualbox.org/query.php")
+        , m_fForceCall(fForceCall)
+    {
+    }
+
+private slots:
+
+    /* Startup slot: */
+    void sltStartStep()
+    {
+        /* Calculate the count of checks left: */
+        int cCount = 1;
+        QString strCount = vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateCheckCount);
+        if (!strCount.isEmpty())
+        {
+            bool ok = false;
+            int c = strCount.toLongLong(&ok);
+            if (ok) cCount = c;
+        }
+
+        /* Compose query: */
+        QUrl url(m_url);
+        url.addQueryItem("platform", vboxGlobal().virtualBox().GetPackageType());
+        /* Check if branding is active: */
+        if (vboxGlobal().brandingIsActive())
+        {
+            /* Branding: Check whether we have a local branding file which tells us our version suffix "FOO"
+                         (e.g. 3.06.54321_FOO) to identify this installation: */
+            url.addQueryItem("version", QString("%1_%2_%3").arg(vboxGlobal().virtualBox().GetVersion())
+                                                           .arg(vboxGlobal().virtualBox().GetRevision())
+                                                           .arg(vboxGlobal().brandingGetKey("VerSuffix")));
+        }
+        else
+        {
+            /* Use hard coded version set by VBOX_VERSION_STRING: */
+            url.addQueryItem("version", QString("%1_%2").arg(vboxGlobal().virtualBox().GetVersion())
+                                                        .arg(vboxGlobal().virtualBox().GetRevision()));
+        }
+        url.addQueryItem("count", QString::number(cCount));
+        url.addQueryItem("branch", VBoxUpdateData(vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateDate)).branchName());
+        QString strUserAgent(QString("VirtualBox %1 <%2>").arg(vboxGlobal().virtualBox().GetVersion()).arg(vboxGlobal().platformInfo()));
+
+        /* Setup GET request: */
+        QNetworkRequest request;
+        request.setUrl(url);
+        request.setRawHeader("User-Agent", strUserAgent.toAscii());
+        QNetworkReply *pReply = gNetworkManager->get(request);
+        connect(pReply, SIGNAL(sslErrors(QList<QSslError>)), pReply, SLOT(ignoreSslErrors()));
+        connect(pReply, SIGNAL(finished()), this, SLOT(sltHandleCheckReply()));
+    }
+
+    /* Finishing slot: */
+    void sltHandleCheckReply()
+    {
+        /* Get corresponding network reply object: */
+        QNetworkReply *pReply = qobject_cast<QNetworkReply*>(sender());
+        /* And ask it for suicide: */
+        pReply->deleteLater();
+
+        /* Handle normal result: */
+        if (pReply->error() == QNetworkReply::NoError)
+        {
+            /* Deserialize incoming data: */
+            QString strResponseData(pReply->readAll());
+
+            /* Newer version of necessary package found: */
+            if (strResponseData.indexOf(QRegExp("^\\d+\\.\\d+\\.\\d+ \\S+$")) == 0)
+            {
+                QStringList response = strResponseData.split(" ", QString::SkipEmptyParts);
+                msgCenter().showUpdateSuccess(vboxGlobal().mainWindow(), response[0], response[1]);
+            }
+            /* No newer version of necessary package found: */
+            else
+            {
+                if (m_fForceCall)
+                    msgCenter().showUpdateNotFound(vboxGlobal().mainWindow());
+            }
+
+            /* Save left count of checks: */
+            int cCount = 1;
+            QString strCount = vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateCheckCount);
+            if (!strCount.isEmpty())
+            {
+                bool ok = false;
+                int c = strCount.toLongLong(&ok);
+                if (ok) cCount = c;
+            }
+            vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_UpdateCheckCount, QString("%1").arg((qulonglong)cCount + 1));
+        }
+        /* Handle errors: */
+        else
+        {
+            if (m_fForceCall)
+                msgCenter().showUpdateFailure(vboxGlobal().mainWindow(), pReply->errorString());
+        }
+
+        /* Notify about step completion: */
+        emit sigStepComplete();
+    }
+
+private:
+
+    /* Variables: */
+    QUrl m_url;
+    bool m_fForceCall;
+};
+
+/* Update step to check for the new VirtualBox Extension Pack version: */
+class UIUpdateStepVirtualBoxExtensionPack : public UIUpdateStep
+{
+    Q_OBJECT;
+
+public:
+
+    /* Constructor: */
+    UIUpdateStepVirtualBoxExtensionPack() {}
+
+private slots:
+
+    /* Startup slot: */
+    void sltStartStep()
+    {
+        /* Return if already downloading: */
+        if (UIDownloaderExtensionPack::current())
+        {
+            emit sigStepComplete();
+            return;
+        }
+
+        /* Get extension pack: */
+        CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(UI_ExtPackName);
+        /* Return if extension pack is NOT installed: */
+        if (extPack.isNull())
+        {
+            emit sigStepComplete();
+            return;
+        }
+
+        /* Get VirtualBox version: */
+        QString strVBoxVersion(vboxGlobal().vboxVersionStringNormalized());
+        VBoxVersion vboxVersion(strVBoxVersion);
+        /* Get extension pack version: */
+        QString strExtPackVersion(extPack.GetVersion().remove(VBOX_BUILD_PUBLISHER));
+        VBoxVersion extPackVersion(strExtPackVersion);
+        /* Check if extension pack version less than required: */
+        if ((vboxVersion.z() % 2 != 0) /* Skip unstable VBox version */ ||
+            !(extPackVersion < vboxVersion) /* Ext Pack version more or equal to VBox version */)
+        {
+            emit sigStepComplete();
+            return;
+        }
+
+        if (strExtPackVersion.contains("ENTERPRISE"))
+        {
+            /* Inform the user that he should update the extension pack: */
+            msgCenter().requestUserDownloadExtensionPack(UI_ExtPackName, strExtPackVersion, strVBoxVersion);
+            /* Never try to download for ENTERPRISE version: */
+            emit sigStepComplete();
+            return;
+        }
+        else
+        {
+            /* Ask the user about extension pack downloading: */
+            if (!msgCenter().proposeDownloadExtensionPack(UI_ExtPackName, strExtPackVersion))
+            {
+                emit sigStepComplete();
+                return;
+            }
+        }
+
+        /* Create and configure the Extension Pack downloader: */
+        UIDownloaderExtensionPack *pDl = UIDownloaderExtensionPack::create();
+        pDl->setParentWidget(msgCenter().mainWindowShown());
+        /* After downloading finished => propose to install the Extension Pack: */
+        connect(pDl, SIGNAL(sigNotifyAboutExtensionPackDownloaded(const QString &, const QString &)),
+                this, SLOT(sltHandleDownloadedExtensionPack(const QString &, const QString &)));
+        /* Also, destroyed downloader is a signal to finish the step: */
+        connect(pDl, SIGNAL(destroyed(QObject*)), this, SIGNAL(sigStepComplete()));
+        /* Start downloading: */
+        pDl->start();
+    }
+
+    /* Finishing slot: */
+    void sltHandleDownloadedExtensionPack(const QString &strSource, const QString &strTarget)
+    {
+        /* Warn the user about extension pack was downloaded and saved, propose to install it: */
+        if (msgCenter().proposeInstallExtentionPack(UI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget)))
+            UIGlobalSettingsExtension::doInstallation(strTarget, msgCenter().mainWindowShown(), NULL);
+    }
+};
+
 /* UIUpdateManager stuff: */
 UIUpdateManager* UIUpdateManager::m_pInstance = 0;
@@ -67,13 +352,17 @@
 {
     /* Force call for new version check: */
-    sltCheckIfUpdateIsNecessary(true);
+    sltCheckIfUpdateIsNecessary(true /* force call */);
 }
 
 UIUpdateManager::UIUpdateManager()
-    : m_uTime(1 /* day */ * 24 /* hours */ * 60 /* minutes */ * 60 /* seconds */ * 1000 /* ms */)
+    : m_pQueue(new UIUpdateQueue(this))
+    , m_uTime(1 /* day */ * 24 /* hours */ * 60 /* minutes */ * 60 /* seconds */ * 1000 /* ms */)
 {
     /* Prepare instance: */
     if (m_pInstance != this)
         m_pInstance = this;
+
+    /* Configure queue: */
+    connect(m_pQueue, SIGNAL(sigQueueFinished()), this, SLOT(sltHandleUpdateFinishing()));
 
 #ifdef VBOX_WITH_UPDATE_REQUEST
@@ -96,17 +385,24 @@
     VBoxUpdateData currentData(vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateDate));
 
-    /* Check if update is really neessary: */
+    /* If update is really necessary: */
     if (fForceCall || currentData.isNeedToCheck())
     {
-        /* Check if update is necessary for VirtualBox itself: */
-        checkIfUpdateIsNecessary(fForceCall);
-
-        /* Check if update is necessary for VirtualBox extension pack: */
-        checkIfUpdateIsNecessaryForExtensionPack(fForceCall);
-
-        /* Encode/save new update data: */
-        VBoxUpdateData newData(currentData.periodIndex(), currentData.branchIndex());
-        vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_UpdateDate, newData.data());
-    }
+        /* Prepare update queue: */
+        m_pQueue->add(new UIUpdateStepVirtualBox(fForceCall));
+        m_pQueue->add(new UIUpdateStepVirtualBoxExtensionPack);
+        /* Start update queue: */
+        m_pQueue->start();
+    }
+    else
+        sltHandleUpdateFinishing();
+}
+
+void UIUpdateManager::sltHandleUpdateFinishing()
+{
+    /* Load/decode curent update data: */
+    VBoxUpdateData currentData(vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateDate));
+    /* Encode/save new update data: */
+    VBoxUpdateData newData(currentData.periodIndex(), currentData.branchIndex());
+    vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_UpdateDate, newData.data());
 
 #ifdef VBOX_WITH_UPDATE_REQUEST
@@ -116,163 +412,4 @@
 }
 
-void UIUpdateManager::checkIfUpdateIsNecessary(bool fForceCall)
-{
-    /* Creating VirtualBox version checker: */
-    UINewVersionChecker checker(fForceCall);
-    /* Start synchronous check: */
-    checker.checkForTheNewVersion();
-}
-
-void UIUpdateManager::checkIfUpdateIsNecessaryForExtensionPack(bool /* fForceCall */)
-{
-    /* Check if updater instance already created: */
-    if (UIDownloaderExtensionPack::current())
-        return;
-
-    /* Get extension pack information: */
-    CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(UI_ExtPackName);
-    /* Check if extension pack is really installed: */
-    if (extPack.isNull())
-        return;
-
-    /* Get VirtualBox version: */
-    QString strVBoxVersion(vboxGlobal().vboxVersionStringNormalized());
-    VBoxVersion vboxVersion(strVBoxVersion);
-    /* Get extension pack version: */
-    QString strExtPackVersion(extPack.GetVersion().remove(VBOX_BUILD_PUBLISHER));
-    VBoxVersion extPackVersion(strExtPackVersion);
-    /* Check if extension pack version less than required: */
-    if ((vboxVersion.z() % 2 != 0) /* Skip unstable VBox version */ ||
-        !(extPackVersion < vboxVersion) /* Ext Pack version more or equal to VBox version */)
-        return;
-
-    if (strExtPackVersion.contains("ENTERPRISE"))
-    {
-        /* Inform the user that he should update the extension pack: */
-        msgCenter().requestUserDownloadExtensionPack(UI_ExtPackName, strExtPackVersion, strVBoxVersion);
-        /* Never try to download here! */
-        return;
-    }
-    else
-    {
-        /* Ask the user about extension pack downloading: */
-        if (!msgCenter().proposeDownloadExtensionPack(UI_ExtPackName, strExtPackVersion))
-            return;
-    }
-
-    /* Run downloader for VirtualBox extension pack: */
-    UIDownloaderExtensionPack::download(this);
-}
-
-void UIUpdateManager::sltHandleDownloadedExtensionPack(const QString &strSource, const QString &strTarget)
-{
-    /* Warn the user about extension pack was downloaded and saved, propose to install it: */
-    if (msgCenter().proposeInstallExtentionPack(UI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget)))
-        UIGlobalSettingsExtension::doInstallation(strTarget, msgCenter().mainWindowShown(), NULL);
-}
-
-/* UINewVersionChecker stuff: */
-UINewVersionChecker::UINewVersionChecker(bool fForceCall)
-    : m_url("http://update.virtualbox.org/query.php")
-    , m_fForceCall(fForceCall)
-    , m_pLoop(new QEventLoop(this))
-{
-}
-
-void UINewVersionChecker::checkForTheNewVersion()
-{
-    /* Calculate the count of checks left: */
-    int cCount = 1;
-    QString strCount = vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateCheckCount);
-    if (!strCount.isEmpty())
-    {
-        bool ok = false;
-        int c = strCount.toLongLong(&ok);
-        if (ok) cCount = c;
-    }
-
-    /* Compose query: */
-    QUrl url(m_url);
-    url.addQueryItem("platform", vboxGlobal().virtualBox().GetPackageType());
-    /* Check if branding is active: */
-    if (vboxGlobal().brandingIsActive())
-    {
-        /* Branding: Check whether we have a local branding file which tells us our version suffix "FOO"
-                     (e.g. 3.06.54321_FOO) to identify this installation: */
-        url.addQueryItem("version", QString("%1_%2_%3").arg(vboxGlobal().virtualBox().GetVersion())
-                                                       .arg(vboxGlobal().virtualBox().GetRevision())
-                                                       .arg(vboxGlobal().brandingGetKey("VerSuffix")));
-    }
-    else
-    {
-        /* Use hard coded version set by VBOX_VERSION_STRING: */
-        url.addQueryItem("version", QString("%1_%2").arg(vboxGlobal().virtualBox().GetVersion())
-                                                    .arg(vboxGlobal().virtualBox().GetRevision()));
-    }
-    url.addQueryItem("count", QString::number(cCount));
-    url.addQueryItem("branch", VBoxUpdateData(vboxGlobal().virtualBox().
-                                              GetExtraData(VBoxDefs::GUI_UpdateDate)).branchName());
-    QString strUserAgent(QString("VirtualBox %1 <%2>")
-                            .arg(vboxGlobal().virtualBox().GetVersion())
-                            .arg(vboxGlobal().platformInfo()));
-
-    /* Setup GET request: */
-    QNetworkRequest request;
-    request.setUrl(url);
-    request.setRawHeader("User-Agent", strUserAgent.toAscii());
-    QNetworkReply *pReply = gNetworkManager->get(request);
-    connect(pReply, SIGNAL(finished()), this, SLOT(sltHandleCheckReply()));
-    connect(pReply, SIGNAL(sslErrors(QList<QSslError>)), pReply, SLOT(ignoreSslErrors()));
-
-    /* Lock event loop: */
-    m_pLoop->exec();
-}
-
-void UINewVersionChecker::sltHandleCheckReply()
-{
-    /* Get corresponding network reply object: */
-    QNetworkReply *pReply = qobject_cast<QNetworkReply*>(sender());
-    /* And ask it for suicide: */
-    pReply->deleteLater();
-
-    /* Handle normal result: */
-    if (pReply->error() == QNetworkReply::NoError)
-    {
-        /* Deserialize incoming data: */
-        QString strResponseData(pReply->readAll());
-
-        /* Newer version of necessary package found: */
-        if (strResponseData.indexOf(QRegExp("^\\d+\\.\\d+\\.\\d+ \\S+$")) == 0)
-        {
-            QStringList response = strResponseData.split(" ", QString::SkipEmptyParts);
-            msgCenter().showUpdateSuccess(vboxGlobal().mainWindow(), response[0], response[1]);
-        }
-        /* No newer version of necessary package found: */
-        else
-        {
-            if (m_fForceCall)
-                msgCenter().showUpdateNotFound(vboxGlobal().mainWindow());
-        }
-
-        /* Save left count of checks: */
-        int cCount = 1;
-        QString strCount = vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_UpdateCheckCount);
-        if (!strCount.isEmpty())
-        {
-            bool ok = false;
-            int c = strCount.toLongLong(&ok);
-            if (ok) cCount = c;
-        }
-        vboxGlobal().virtualBox().SetExtraData(VBoxDefs::GUI_UpdateCheckCount, QString("%1").arg((qulonglong)cCount + 1));
-    }
-    /* Handle errors: */
-    else
-    {
-        if (m_fForceCall)
-            msgCenter().showUpdateFailure(vboxGlobal().mainWindow(), pReply->errorString());
-    }
-
-    /* Unlock event loop: */
-    m_pLoop->exit();
-}
-
+#include "UIUpdateManager.moc"
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h	(revision 39336)
+++ trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h	(revision 39337)
@@ -21,14 +21,11 @@
 
 /* Global includes: */
-#include <QUrl>
-
-/* Local includes: */
-#include "UIUpdateDefs.h"
+#include <QObject>
 
 /* Forward declarations: */
-class QEventLoop;
+class UIUpdateQueue;
 
-/* Singleton to check for the new VirtualBox version.
- * Performs update of required parts if necessary. */
+/* Singleton to perform new version checks and
+ * updates of various VirtualBox parts. */
 class UIUpdateManager : public QObject
 {
@@ -54,6 +51,6 @@
     void sltCheckIfUpdateIsNecessary(bool fForceCall = false);
 
-    /* Handle downloaded extension pack: */
-    void sltHandleDownloadedExtensionPack(const QString &strSource, const QString &strTarget);
+    /* Slot to handle update finishing: */
+    void sltHandleUpdateFinishing();
 
 private:
@@ -63,39 +60,10 @@
     ~UIUpdateManager();
 
-    /* Helping stuff: */
-    void checkIfUpdateIsNecessary(bool fForceCall);
-    void checkIfUpdateIsNecessaryForExtensionPack(bool fForceCall);
-
     /* Variables: */
     static UIUpdateManager* m_pInstance;
+    UIUpdateQueue *m_pQueue;
     quint64 m_uTime;
 };
 #define gUpdateManager UIUpdateManager::instance()
 
-/* Class to check for the new VirtualBox version: */
-class UINewVersionChecker : public QObject
-{
-    Q_OBJECT;
-
-public:
-
-    /* Constructor: */
-    UINewVersionChecker(bool fForceCall);
-
-    /* Function to check if new version is available: */
-    void checkForTheNewVersion();
-
-private slots:
-
-    /* Slot to analyze new version check reply: */
-    void sltHandleCheckReply();
-
-private:
-
-    /* Variables: */
-    QUrl m_url;
-    bool m_fForceCall;
-    QEventLoop *m_pLoop;
-};
-
 #endif // __UIUpdateManager_h__
