mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 462438 - kill MOZ_PROFILESHARING and MOZ_IPCD; profile cleanup; r+sr=benjamin
This commit is contained in:
parent
c3598f404a
commit
add5094aff
@ -46,11 +46,6 @@
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
||||
#ifdef MOZ_PROFILESHARING
|
||||
#include "nsIProfileSharingSetup.h"
|
||||
#include "ipcITransactionService.h"
|
||||
#endif
|
||||
|
||||
// File Name Defines
|
||||
|
||||
#define PREFS_FILE_50_NAME NS_LITERAL_CSTRING("prefs.js")
|
||||
@ -117,22 +112,6 @@ nsProfileDirServiceProvider::SetProfileDir(nsIFile* aProfileDir,
|
||||
// errors
|
||||
mLocalProfileDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
|
||||
|
||||
#ifdef MOZ_PROFILESHARING
|
||||
if (mSharingEnabled) {
|
||||
nsCOMPtr<ipcITransactionService> transServ =
|
||||
do_GetService(IPC_TRANSACTIONSERVICE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCAutoString nativePath;
|
||||
rv = mProfileDir->GetNativePath(nativePath);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = transServ->Init(nativePath);
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Unable to initialize transaction service");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_PROFILELOCKING
|
||||
// Lock the non-shared sub-dir if we are sharing,
|
||||
// the whole profile dir if we are not.
|
||||
@ -213,18 +192,6 @@ nsProfileDirServiceProvider::GetFile(const char *prop, PRBool *persistant, nsIFi
|
||||
*persistant = PR_TRUE;
|
||||
nsIFile* domainDir = mProfileDir;
|
||||
|
||||
#ifdef MOZ_PROFILESHARING
|
||||
// If the prop is prefixed with NS_SHARED,
|
||||
// the location is in the shared domain.
|
||||
PRBool bUseShared = PR_FALSE;
|
||||
if (strncmp(prop, NS_SHARED, sizeof(NS_SHARED)-1) == 0) {
|
||||
prop += (sizeof(NS_SHARED)-1);
|
||||
bUseShared = PR_TRUE;
|
||||
}
|
||||
if (!bUseShared && mNonSharedProfileDir)
|
||||
domainDir = mNonSharedProfileDir;
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIFile> localFile;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
@ -323,18 +290,6 @@ nsProfileDirServiceProvider::Initialize()
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_PROFILESHARING
|
||||
nsCOMPtr<nsIProfileSharingSetup> sharingSetup =
|
||||
do_GetService("@mozilla.org/embedcomp/profile-sharing-setup;1");
|
||||
if (sharingSetup) {
|
||||
PRBool tempBool;
|
||||
if (NS_SUCCEEDED(sharingSetup->GetIsSharingEnabled(&tempBool)))
|
||||
mSharingEnabled = tempBool;
|
||||
if (mSharingEnabled)
|
||||
sharingSetup->GetClientName(mNonSharedDirName);
|
||||
}
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user