Changed API for nsIFileLocator
git-svn-id: svn://10.0.0.236/trunk@35366 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsFileStream.h"
|
||||
#include "nsIFileLocator.h"
|
||||
#include "nsIFileSpec.h"
|
||||
#include "nsFileLocations.h"
|
||||
|
||||
extern "C" {
|
||||
@@ -187,20 +188,11 @@ cookie_Localize(char* genericString) {
|
||||
}
|
||||
|
||||
PRIVATE nsresult cookie_ProfileDirectory(nsFileSpec& dirSpec) {
|
||||
nsresult rv;
|
||||
nsIFileLocator* locator = nsnull;
|
||||
rv = nsServiceManager::GetService
|
||||
(kFileLocatorCID, kIFileLocatorIID, (nsISupports**)&locator);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
if (!locator) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
rv = locator->GetFileLocation
|
||||
(nsSpecialFileSpec::App_UserProfileDirectory50, &dirSpec);
|
||||
nsServiceManager::ReleaseService(kFileLocatorCID, locator);
|
||||
return rv;
|
||||
nsIFileSpec* spec = NS_LocateFileOrDirectory(
|
||||
nsSpecialFileSpec::App_UserProfileDirectory50);
|
||||
if (!spec)
|
||||
return NS_ERROR_FAILURE;
|
||||
return spec->GetFileSpec(&dirSpec);
|
||||
}
|
||||
|
||||
#ifndef XP_MAC
|
||||
|
||||
Reference in New Issue
Block a user