mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
moving NS_SoftwareUpdateRequestAutoReg to somewhere where it can do no harm.
This commit is contained in:
parent
8302c260df
commit
027108fddf
@ -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<nsIFile> 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__
|
||||
|
||||
|
@ -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<nsIFile> 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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user