Skip to main content
Sign in
Snippets Groups Projects
Verified Commit 0b6e14af authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 13252: Customize profile management on macOS

Bug 41647: Clean up our {TOR,BASE}_BROWSER(_VERSION)? macros

For these changes, we need to change TOR_BROWSER_VERSION to
TOR_BROWSER, since they are Tor Browser-specific.
parent 0f28c0c9
1 merge request!568Bug 41647 & 41657 & 41453: macro cleanup
......@@ -240,7 +240,7 @@ nsresult nsXREDirProvider::GetUserProfilesRootDir(nsIFile** aResult) {
if (NS_SUCCEEDED(rv)) {
// For some reason, we have decided not to append "Profiles" in Tor Browser.
// So, let's keep removing it, or we should somehow migrate the profile.
#if !defined(TOR_BROWSER_VERSION) && (!defined(XP_UNIX) || defined(XP_MACOSX))
#if !defined(TOR_BROWSER) && (!defined(XP_UNIX) || defined(XP_MACOSX))
rv = file->AppendNative("Profiles"_ns);
#endif
// We must create the profile directory here if it does not exist.
......@@ -258,7 +258,7 @@ nsresult nsXREDirProvider::GetUserProfilesLocalDir(nsIFile** aResult) {
nsresult rv = GetUserDataDirectory(getter_AddRefs(file), true);
if (NS_SUCCEEDED(rv)) {
#if !defined(TOR_BROWSER_VERSION) && (!defined(XP_UNIX) || defined(XP_MACOSX))
#if !defined(TOR_BROWSER) && (!defined(XP_UNIX) || defined(XP_MACOSX))
rv = file->AppendNative("Profiles"_ns);
#endif
// We must create the profile directory here if it does not exist.
......@@ -1477,7 +1477,7 @@ nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
#if defined(XP_MACOSX)
FSRef fsRef;
# if defined(TOR_BROWSER_VERSION)
# if defined(TOR_BROWSER)
OSType folderType = kApplicationSupportFolderType;
# else
OSType folderType;
......@@ -1503,7 +1503,7 @@ nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
rv = dirFileMac->InitWithFSRef(&fsRef);
NS_ENSURE_SUCCESS(rv, rv);
# if defined(TOR_BROWSER_VERSION)
# if defined(TOR_BROWSER)
rv = dirFileMac->AppendNative("TorBrowser-Data"_ns);
NS_ENSURE_SUCCESS(rv, rv);
rv = dirFileMac->AppendNative("Browser"_ns);
......@@ -1703,7 +1703,7 @@ nsresult nsXREDirProvider::AppendProfilePath(nsIFile* aFile, bool aLocal) {
nsresult rv = NS_OK;
#if defined(XP_MACOSX)
# ifndef TOR_BROWSER_VERSION
# ifndef TOR_BROWSER
// For Tor Browser we already prepare the data directory as we need it, even
// when we are running a system install.
if (!profile.IsEmpty()) {
......
......
......@@ -354,7 +354,7 @@ nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
#if defined(MOZ_WIDGET_COCOA)
FSRef fsRef;
# if defined(TOR_BROWSER_VERSION)
# if defined(TOR_BROWSER)
OSType folderType = kApplicationSupportFolderType;
# else
OSType folderType =
......@@ -374,7 +374,7 @@ nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
return rv;
}
# if defined(TOR_BROWSER_VERSION)
# if defined(TOR_BROWSER)
rv = localDir->AppendNative("TorBrowser-Data"_ns);
NS_ENSURE_SUCCESS(rv, rv);
rv = localDir->AppendNative("Browser"_ns);
......@@ -406,7 +406,7 @@ nsresult nsAppFileLocationProvider::GetProductDirectory(nsIFile** aLocalFile,
# error dont_know_how_to_get_product_dir_on_your_platform
#endif
#if !defined(TOR_BROWSER_VERSION)
#if !defined(TOR_BROWSER)
rv = localDir->AppendRelativeNativePath(DEFAULT_PRODUCT_DIR);
if (NS_FAILED(rv)) {
return rv;
......@@ -452,7 +452,7 @@ nsresult nsAppFileLocationProvider::GetDefaultUserProfileRoot(
#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN)
// These 3 platforms share this part of the path - do them as one
# ifndef TOR_BROWSER_VERSION
# ifndef TOR_BROWSER
// Legacy: we do not use "Profiles" on Tor Browser.
rv = localDir->AppendRelativeNativePath("Profiles"_ns);
if (NS_FAILED(rv)) {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment