Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 60181)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 60182)
@@ -1965,5 +1965,5 @@
         hotloadMachineExtraDataMap(strID);
 
-    /* Read-only access corresponding map: */
+    /* Make a read-only copy of the corresponding map: */
     const ExtraDataMap data = m_data.value(strID);
 
@@ -1974,4 +1974,39 @@
     /* Returns corresponding value: */
     return data[strKey];
+}
+
+QString UIExtraDataManager::extraDataStringUnion(const QString &strKey, const QString &strID)
+{
+    /* Machine extra-data first: */
+    if (strID != GlobalID)
+    {
+        MapOfExtraDataMaps::const_iterator itMap = m_data.constFind(strID);
+
+        /* Hot-load machine extra-data map if necessary: */
+        if (itMap == m_data.constEnd())
+        {
+            hotloadMachineExtraDataMap(strID);
+            itMap = m_data.constFind(strID);
+        }
+        if (itMap != m_data.constEnd())
+        {
+            /* Return string if present in the map: */
+            ExtraDataMap::const_iterator itValue = itMap->constFind(strKey);
+            if (itValue != itMap->constEnd())
+                return *itValue;
+        }
+    }
+
+    /* Global extra-data: */
+    MapOfExtraDataMaps::const_iterator itMap = m_data.constFind(GlobalID);
+    if (itMap != m_data.constEnd())
+    {
+        ExtraDataMap::const_iterator itValue = itMap->constFind(strKey);
+        if (itValue != itMap->constEnd())
+            return *itValue;
+    }
+
+    /* Not found, return null string: */
+    return QString();
 }
 
@@ -4044,17 +4079,10 @@
 bool UIExtraDataManager::isFeatureAllowed(const QString &strKey, const QString &strID /* = GlobalID */)
 {
-    /* Hot-load machine extra-data map if necessary: */
-    if (strID != GlobalID && !m_data.contains(strID))
-        hotloadMachineExtraDataMap(strID);
-
-    /* Read-only access corresponding map: */
-    const ExtraDataMap data = m_data.value(strID);
-
-    /* 'false' if value was not set: */
-    if (!data.contains(strKey))
+    /* Get the value. Return 'false' if not found: */
+    const QString strValue = extraDataStringUnion(strKey, strID);
+    if (strValue.isNull())
         return false;
 
     /* Check corresponding value: */
-    const QString &strValue = data[strKey];
     return    strValue.compare("true", Qt::CaseInsensitive) == 0
            || strValue.compare("yes", Qt::CaseInsensitive) == 0
@@ -4065,17 +4093,10 @@
 bool UIExtraDataManager::isFeatureRestricted(const QString &strKey, const QString &strID /* = GlobalID */)
 {
-    /* Hot-load machine extra-data map if necessary: */
-    if (strID != GlobalID && !m_data.contains(strID))
-        hotloadMachineExtraDataMap(strID);
-
-    /* Read-only access corresponding map: */
-    const ExtraDataMap data = m_data.value(strID);
-
-    /* 'false' if value was not set: */
-    if (!data.contains(strKey))
+    /* Get the value. Return 'false' if not found: */
+    const QString strValue = extraDataStringUnion(strKey, strID);
+    if (strValue.isNull())
         return false;
 
     /* Check corresponding value: */
-    const QString &strValue = data[strKey];
     return    strValue.compare("false", Qt::CaseInsensitive) == 0
            || strValue.compare("no", Qt::CaseInsensitive) == 0
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 60181)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 60182)
@@ -592,9 +592,23 @@
 #endif /* DEBUG */
 
+    /**
+     * Retrieves an extra-data key from both machine and global sources.
+     *
+     * If @a strID isn't #GlobalID, this will first check the extra-data associated
+     * with the machine given by @a strID then fallback on the global extra-data.
+     *
+     * @returns String value if found, null string if not.
+     * @param   strKey      The extra-data key to get.
+     * @param   strID       Machine UUID or #GlobalID.
+     * @param   strValue    Where to return the value when found.
+     */
+    QString extraDataStringUnion(const QString &strKey, const QString &strID);
     /** Determines whether feature corresponding to passed @a strKey is allowed.
-      * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
+     *  If valid @a strID is set => applies to machine extra-data and global,
+     *  otherwise => only to global one. */
     bool isFeatureAllowed(const QString &strKey, const QString &strID = GlobalID);
     /** Determines whether feature corresponding to passed @a strKey is restricted.
-      * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
+     *  If valid @a strID is set => applies to machine extra-data and global,
+     *  otherwise => only to global one. */
     bool isFeatureRestricted(const QString &strKey, const QString &strID = GlobalID);
 
@@ -616,6 +630,8 @@
     UIExtraDataEventHandler *m_pHandler;
 
+    /** Maps of extra data maps.  The index is a UUID string. */
+    typedef QMap<QString, ExtraDataMap> MapOfExtraDataMaps;
     /** Holds extra-data map instance. */
-    QMap<QString, ExtraDataMap> m_data;
+    MapOfExtraDataMaps m_data;
 
 #ifdef DEBUG
