bug 47437, nscookie.cpp is duplicationg URL parsing logic, c=andreas.otte, r=morse, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@105740 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -51,6 +51,8 @@
|
||||
#include "xp_core.h"
|
||||
#include "prmem.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
static const char *kCookiesPermFileName = "cookperm.txt";
|
||||
|
||||
@@ -684,11 +686,17 @@ PERMISSION_DeletePersistentUserData(void)
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
PERMISSION_Add(const char * objectURL, PRBool permission, PRInt32 type) {
|
||||
PERMISSION_Add(const char * objectURL, PRBool permission, PRInt32 type,
|
||||
nsIIOService* ioService) {
|
||||
if (!objectURL) {
|
||||
return;
|
||||
}
|
||||
char *host = CKutil_ParseURL(objectURL, GET_HOST_PART);
|
||||
nsresult rv = NS_OK;
|
||||
char *host = nsnull;
|
||||
PRUint32 start,end;
|
||||
NS_ASSERTION(ioService, "IOService not available");
|
||||
rv = ioService->ExtractUrlPart(objectURL, nsIIOService::url_Host |
|
||||
nsIIOService::url_Port, &start, &end, &host);
|
||||
|
||||
/*
|
||||
* if permission is false, it will be added to the permission list
|
||||
|
||||
Reference in New Issue
Block a user