diff --git a/xpinstall/public/nsISoftwareUpdate.h b/xpinstall/public/nsISoftwareUpdate.h index 14973a3049fe..e571b5b3ae96 100644 --- a/xpinstall/public/nsISoftwareUpdate.h +++ b/xpinstall/public/nsISoftwareUpdate.h @@ -86,34 +86,5 @@ class nsISoftwareUpdate : public nsISupports }; -/** - * Request that an autoreg be performed at next startup. (Used - * internally by XPI.) This basically drops a files next to the - * application. Next time XPCOM sees this file, it will cause - * an autoreg, then delete this file. - */ -void -NS_SoftwareUpdateRequestAutoReg() -{ - nsresult rv; - nsCOMPtr file; - NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, - getter_AddRefs(file)); - - if (!file) { - NS_WARNING("Getting NS_XPCOM_CURRENT_PROCESS_DIR failed"); - return; - } - - file->AppendNative(nsDependentCString(".autoreg")); - - rv = file->Create(nsIFile::NORMAL_FILE_TYPE, 0666); - - if (NS_FAILED(rv)) { - NS_WARNING("creating file failed"); - return; - } -} - #endif // nsISoftwareUpdate_h__ diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index e08fee92eabf..d56e74fd92e5 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -100,6 +100,37 @@ static NS_DEFINE_IID(kIStringBundleServiceIID, NS_ISTRINGBUNDLESERVICE_IID); #define kInstallLocaleProperties "chrome://global/locale/commonDialogs.properties" +/** + * Request that an autoreg be performed at next startup. (Used + * internally by XPI.) This basically drops a files next to the + * application. Next time XPCOM sees this file, it will cause + * an autoreg, then delete this file. + */ +static void +NS_SoftwareUpdateRequestAutoReg() +{ + nsresult rv; + nsCOMPtr file; + NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, + getter_AddRefs(file)); + + if (!file) { + NS_WARNING("Getting NS_XPCOM_CURRENT_PROCESS_DIR failed"); + return; + } + + file->AppendNative(nsDependentCString(".autoreg")); + + rv = file->Create(nsIFile::NORMAL_FILE_TYPE, 0666); + + if (NS_FAILED(rv)) { + NS_WARNING("creating file failed"); + return; + } +} + + + MOZ_DECL_CTOR_COUNTER(nsInstallInfo) nsInstallInfo::nsInstallInfo(PRUint32 aInstallType,