Backed out 2 changesets (bug 784739) because of Windows build failures

Backed out changeset 06ae36377cfa (bug 784739)
Backed out changeset e56f91d780df (bug 784739)
This commit is contained in:
Ehsan Akhgari
2013-04-02 23:04:49 -04:00
parent 9e6ee4a38d
commit 755333d3f2
10 changed files with 117 additions and 117 deletions

View File

@@ -42,7 +42,7 @@ template <class T>void SafeRelease(T **ppT)
{
if (*ppT) {
(*ppT)->Release();
*ppT = nullptr;
*ppT = NULL;
}
}
@@ -63,8 +63,8 @@ public:
CExecuteCommandVerb() :
mRef(1),
mShellItemArray(nullptr),
mUnkSite(nullptr),
mShellItemArray(NULL),
mUnkSite(NULL),
mTargetIsFileSystemLink(false),
mIsDesktopRequest(true),
mRequestMet(false)
@@ -148,9 +148,9 @@ public:
#ifdef SHOW_CONSOLE
Log(L"SetSelection param count: %d", count);
for (DWORD idx = 0; idx < count; idx++) {
IShellItem* item = nullptr;
IShellItem* item = NULL;
if (SUCCEEDED(aArray->GetItemAt(idx, &item))) {
LPWSTR str = nullptr;
LPWSTR str = NULL;
if (FAILED(item->GetDisplayName(SIGDN_FILESYSPATH, &str))) {
if (FAILED(item->GetDisplayName(SIGDN_URL, &str))) {
Log(L"Failed to get a shell item array item.");
@@ -165,7 +165,7 @@ public:
}
#endif
IShellItem* item = nullptr;
IShellItem* item = NULL;
if (FAILED(aArray->GetItemAt(0, &item))) {
return E_FAIL;
}
@@ -183,7 +183,7 @@ public:
IFACEMETHODIMP GetSelection(REFIID aRefID, void **aInt)
{
*aInt = nullptr;
*aInt = NULL;
return mShellItemArray ? mShellItemArray->QueryInterface(aRefID, aInt) : E_FAIL;
}
@@ -207,7 +207,7 @@ public:
IFACEMETHODIMP GetSite(REFIID aRefID, void **aInt)
{
*aInt = nullptr;
*aInt = NULL;
return mUnkSite ? mUnkSite->QueryInterface(aRefID, aInt) : E_FAIL;
}
@@ -224,14 +224,14 @@ public:
}
HRESULT hr;
IServiceProvider* pSvcProvider = nullptr;
IServiceProvider* pSvcProvider = NULL;
hr = mUnkSite->QueryInterface(IID_IServiceProvider, (void**)&pSvcProvider);
if (!pSvcProvider) {
Log(L"Couldn't get IServiceProvider service from explorer. (%X)", hr);
return S_OK;
}
IExecuteCommandHost* pHost = nullptr;
IExecuteCommandHost* pHost = NULL;
// If we can't get this it's a conventional desktop launch
hr = pSvcProvider->QueryService(SID_ExecuteCommandHost,
IID_IExecuteCommandHost, (void**)&pHost);
@@ -282,7 +282,7 @@ public:
bool result = false;
IApplicationAssociationRegistration* pAAR;
HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
nullptr,
NULL,
CLSCTX_INPROC,
IID_IApplicationAssociationRegistration,
(void**)&pAAR);
@@ -348,7 +348,7 @@ static bool GetModulePath(CStringW& aPathBuffer)
WCHAR buffer[MAX_PATH];
memset(buffer, 0, sizeof(buffer));
if (!GetModuleFileName(nullptr, buffer, MAX_PATH)) {
if (!GetModuleFileName(NULL, buffer, MAX_PATH)) {
Log(L"GetModuleFileName failed.");
return false;
}
@@ -400,7 +400,7 @@ static bool GetDefaultBrowserAppModelID(WCHAR* aIDBuffer,
}
DWORD len = aCharLength * sizeof(WCHAR);
memset(aIDBuffer, 0, len);
if (RegQueryValueExW(key, L"AppUserModelID", nullptr, nullptr,
if (RegQueryValueExW(key, L"AppUserModelID", NULL, NULL,
(LPBYTE)aIDBuffer, &len) != ERROR_SUCCESS || !len) {
RegCloseKey(key);
return false;
@@ -492,7 +492,7 @@ bool CExecuteCommandVerb::SetTargetPath(IShellItem* aItem)
CComPtr<IDataObject> object;
// Check the underlying data object first to insure we get
// absolute uri. See chromium bug 157184.
if (SUCCEEDED(aItem->BindToHandler(nullptr, BHID_DataObject,
if (SUCCEEDED(aItem->BindToHandler(NULL, BHID_DataObject,
IID_IDataObject,
reinterpret_cast<void**>(&object))) &&
GetPlainText(object, cstrText)) {
@@ -515,7 +515,7 @@ bool CExecuteCommandVerb::SetTargetPath(IShellItem* aItem)
Log(L"No data object or data object has no text.");
// Use the shell item display name
LPWSTR str = nullptr;
LPWSTR str = NULL;
mTargetIsFileSystemLink = true;
if (FAILED(aItem->GetDisplayName(SIGDN_FILESYSPATH, &str))) {
mTargetIsFileSystemLink = false;
@@ -555,12 +555,12 @@ void CExecuteCommandVerb::LaunchDesktopBrowser()
SHELLEXECUTEINFOW seinfo;
memset(&seinfo, 0, sizeof(seinfo));
seinfo.cbSize = sizeof(SHELLEXECUTEINFOW);
seinfo.fMask = nullptr;
seinfo.hwnd = nullptr;
seinfo.lpVerb = nullptr;
seinfo.fMask = NULL;
seinfo.hwnd = NULL;
seinfo.lpVerb = NULL;
seinfo.lpFile = browserPath;
seinfo.lpParameters = params;
seinfo.lpDirectory = nullptr;
seinfo.lpDirectory = NULL;
seinfo.nShow = SW_SHOWNORMAL;
ShellExecuteExW(&seinfo);
@@ -594,9 +594,9 @@ IFACEMETHODIMP CExecuteCommandVerb::Execute()
}
// Launch into Metro
IApplicationActivationManager* activateMgr = nullptr;
IApplicationActivationManager* activateMgr = NULL;
DWORD processID;
if (FAILED(CoCreateInstance(CLSID_ApplicationActivationManager, nullptr,
if (FAILED(CoCreateInstance(CLSID_ApplicationActivationManager, NULL,
CLSCTX_LOCAL_SERVER,
IID_IApplicationActivationManager,
(void**)&activateMgr))) {
@@ -616,7 +616,7 @@ IFACEMETHODIMP CExecuteCommandVerb::Execute()
// Hand off focus rights to the out-of-process activation server. Without
// this the metro interface won't launch.
hr = CoAllowSetForegroundWindow(activateMgr, nullptr);
hr = CoAllowSetForegroundWindow(activateMgr, NULL);
if (FAILED(hr)) {
Log(L"CoAllowSetForegroundWindow result %X", hr);
activateMgr->Release();
@@ -686,7 +686,7 @@ ClassFactory::Register(CLSCTX aClass, REGCLS aUse)
STDMETHODIMP
ClassFactory::QueryInterface(REFIID riid, void **ppv)
{
IUnknown *punk = nullptr;
IUnknown *punk = NULL;
if (riid == IID_IUnknown || riid == IID_IClassFactory) {
punk = static_cast<IClassFactory*>(this);
}
@@ -702,7 +702,7 @@ ClassFactory::QueryInterface(REFIID riid, void **ppv)
STDMETHODIMP
ClassFactory::CreateInstance(IUnknown *punkOuter, REFIID riid, void **ppv)
{
*ppv = nullptr;
*ppv = NULL;
if (punkOuter)
return CLASS_E_NOAGGREGATION;
return mUnkObject->QueryInterface(riid, ppv);
@@ -730,7 +730,7 @@ int APIENTRY wWinMain(HINSTANCE, HINSTANCE, PWSTR pszCmdLine, int)
if (!wcslen(pszCmdLine) || StrStrI(pszCmdLine, L"-Embedding"))
{
CoInitialize(nullptr);
CoInitialize(NULL);
CExecuteCommandVerb *pHandler = new CExecuteCommandVerb();
if (!pHandler)
@@ -743,13 +743,13 @@ int APIENTRY wWinMain(HINSTANCE, HINSTANCE, PWSTR pszCmdLine, int)
ClassFactory classFactory(ppi);
ppi->Release();
ppi = nullptr;
ppi = NULL;
// REGCLS_SINGLEUSE insures we only get used once and then discarded.
if (FAILED(classFactory.Register(CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE)))
return -1;
if (!SetTimer(nullptr, 1, HEARTBEAT_MSEC, nullptr)) {
if (!SetTimer(NULL, 1, HEARTBEAT_MSEC, NULL)) {
Log(L"Failed to set timer, can't process request.");
return -1;
}