added NS_LITERAL_CSTRINGs to nsIFile.cpp. Some XPIDialog/Progress code in Tests.cpp

git-svn-id: svn://10.0.0.236/trunk@120416 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
depstein%netscape.com
2002-05-01 03:33:18 +00:00
parent d03ea4fcfc
commit d6f19b4e46
7 changed files with 245 additions and 342 deletions

View File

@@ -36,16 +36,16 @@
// WARNING: These hard coded names need to go away. They need to
// come from localizable resources
#define APP_REGISTRY_NAME "registry.dat"
#define APP_REGISTRY_NAME NS_LITERAL_CSTRING("registry.dat")
#define PROFILE_ROOT_DIR_NAME "Profiles"
#define DEFAULTS_DIR_NAME "defaults"
#define DEFAULTS_PREF_DIR_NAME "pref"
#define DEFAULTS_PROFILE_DIR_NAME "profile"
#define RES_DIR_NAME "res"
#define CHROME_DIR_NAME "chrome"
#define PLUGINS_DIR_NAME "plugins"
#define SEARCH_DIR_NAME "searchplugins"
#define PROFILE_ROOT_DIR_NAME NS_LITERAL_CSTRING("Profiles")
#define DEFAULTS_DIR_NAME NS_LITERAL_CSTRING("defaults")
#define DEFAULTS_PREF_DIR_NAME NS_LITERAL_CSTRING("pref")
#define DEFAULTS_PROFILE_DIR_NAME NS_LITERAL_CSTRING("profile")
#define RES_DIR_NAME NS_LITERAL_CSTRING("res")
#define CHROME_DIR_NAME NS_LITERAL_CSTRING("chrome")
#define PLUGINS_DIR_NAME NS_LITERAL_CSTRING("plugins")
#define SEARCH_DIR_NAME NS_LITERAL_CSTRING("searchplugins")
//*****************************************************************************
@@ -167,9 +167,8 @@ NS_METHOD winEmbedFileLocProvider::CloneMozBinDirectory(nsILocalFile **aLocalFil
// This will be set if a directory was passed to NS_InitXPCOM
// 2. If that doesn't work, set it to be the current process directory
// NS_WITH_SERVICE(nsIProperties, directoryService, NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
nsCOMPtr<nsIProperties> directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID,&rv));
nsCOMPtr<nsIProperties> directoryService =
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv))
return rv;
@@ -208,9 +207,8 @@ NS_METHOD winEmbedFileLocProvider::GetProductDirectory(nsILocalFile **aLocalFile
PRBool exists;
nsCOMPtr<nsILocalFile> localDir;
//NS_WITH_SERVICE(nsIProperties, directoryService, NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
nsCOMPtr<nsIProperties> directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID,&rv));
nsCOMPtr<nsIProperties> directoryService =
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = directoryService->Get(NS_WIN_APPDATA_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir));
if (NS_SUCCEEDED(rv))
@@ -223,7 +221,7 @@ NS_METHOD winEmbedFileLocProvider::GetProductDirectory(nsILocalFile **aLocalFile
}
if (NS_FAILED(rv)) return rv;
rv = localDir->AppendRelativePath(mProductDirName);
rv = localDir->AppendRelativeNativePath(nsDependentCString(mProductDirName));
if (NS_FAILED(rv)) return rv;
rv = localDir->Exists(&exists);
if (NS_SUCCEEDED(rv) && !exists)