Changes contributed by Tom Lendacky ( toml@us.ibm.com ).

*** NOT PART OF THE BUILD ***
This commit is contained in:
harishd%netscape.com 2001-04-09 20:27:35 +00:00
parent 9a57284db3
commit 010408bd12
3 changed files with 27 additions and 35 deletions

View File

@ -343,7 +343,7 @@ nsP3PPreferences::GetBoolPref( nsCString aCategory,
PRBool bRecipient; PRBool bRecipient;
#ifdef DEBUG_P3P #ifdef DEBUG_P3P
printf("P3P: P3PPreferences: GetBoolPref(%s, %s, %s)\n", (char *) aCategory, (char *) aPurpose, (char *) aRecipient); printf("P3P: P3PPreferences: GetBoolPref(%s, %s, %s)\n", (const char *) aCategory, (const char *) aPurpose, (const char *) aRecipient);
#endif #endif
pPrefName = P3P_PREF; pPrefName = P3P_PREF;
@ -356,7 +356,7 @@ nsP3PPreferences::GetBoolPref( nsCString aCategory,
if (NS_SUCCEEDED( rv )) { if (NS_SUCCEEDED( rv )) {
#ifdef DEBUG_P3P #ifdef DEBUG_P3P
printf("P3P: P3PPreferences: Setting for %s is %s.\n", printf("P3P: P3PPreferences: Setting for %s is %s.\n",
(char *) pPrefName, (*aResult) ? "true" : "false"); (const char *) pPrefName, (*aResult) ? "true" : "false");
#endif #endif
if (aRecipient.Equals("ours")) { if (aRecipient.Equals("ours")) {
bRecipient = PR_TRUE; bRecipient = PR_TRUE;
@ -369,7 +369,7 @@ nsP3PPreferences::GetBoolPref( nsCString aCategory,
#ifdef DEBUG_P3P #ifdef DEBUG_P3P
if (NS_SUCCEEDED( rv )) { if (NS_SUCCEEDED( rv )) {
printf("P3P: P3PPreferences: Setting for %s is %s.\n", printf("P3P: P3PPreferences: Setting for %s is %s.\n",
(char *) pPrefName, (*aResult) ? "true" : "false"); (const char *) pPrefName, (*aResult) ? "true" : "false");
} }
#endif #endif
} }
@ -380,7 +380,7 @@ nsP3PPreferences::GetBoolPref( nsCString aCategory,
} }
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
PR_LOG( gP3PLogModule, PR_LOG_NOTICE, ("P3PPreferenceService: GetBoolPref(%s, %s, %s) failed with return value %X.\n", (char *) aCategory, (char *) aPurpose, (char *) aRecipient, rv) ); PR_LOG( gP3PLogModule, PR_LOG_NOTICE, ("P3PPreferenceService: GetBoolPref(%s, %s, %s) failed with return value %X.\n", (const char *) aCategory, (const char *) aPurpose, (const char *) aRecipient, rv) );
#ifdef DEBUG_P3P #ifdef DEBUG_P3P
printf("P3P: P3PPreferences: GetBoolPref() failed with return value %x.\n", rv); printf("P3P: P3PPreferences: GetBoolPref() failed with return value %x.\n", rv);
#endif #endif
@ -388,7 +388,7 @@ nsP3PPreferences::GetBoolPref( nsCString aCategory,
#ifdef DEBUG_P3P #ifdef DEBUG_P3P
else { else {
printf("P3P: P3PPreferences: Setting for %s, %s, %s is %s.\n", printf("P3P: P3PPreferences: Setting for %s, %s, %s is %s.\n",
(char *) aCategory, (char *) aPurpose, (char *) aRecipient, (*aResult) ? "true" : "false"); (const char *) aCategory, (const char *) aPurpose, (const char *) aRecipient, (*aResult) ? "true" : "false");
} }
#endif #endif

View File

@ -75,10 +75,11 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT( nsP3PService, Init );
// Function: Regsiter the P3P Service to start on the first HTTP request. // Function: Regsiter the P3P Service to start on the first HTTP request.
// //
NS_METHOD NS_METHOD
nsP3PService::CategoryRegister( nsIComponentManager *aComponentManager, nsP3PService::CategoryRegister( nsIComponentManager *aComponentManager,
nsIFile *aPath, nsIFile *aPath,
const char *aRegistryLocation, const char *aRegistryLocation,
const char *aComponentType ) { const char *aComponentType,
const nsModuleComponentInfo *aInfo ) {
nsresult rv; nsresult rv;
@ -118,9 +119,10 @@ nsP3PService::CategoryRegister( nsIComponentManager *aComponentManager,
// Function: Unregsiter the P3P Service to start on the first HTTP request. // Function: Unregsiter the P3P Service to start on the first HTTP request.
// //
NS_METHOD NS_METHOD
nsP3PService::CategoryUnregister( nsIComponentManager *aComponentManager, nsP3PService::CategoryUnregister( nsIComponentManager *aComponentManager,
nsIFile *aPath, nsIFile *aPath,
const char *aRegistryLocation ) { const char *aRegistryLocation,
const nsModuleComponentInfo *aInfo ) {
nsresult rv; nsresult rv;
@ -1803,21 +1805,8 @@ nsP3PService::GetURIComponents( nsIURI *aURI,
rv = aURI->GetPort(&iPort ); rv = aURI->GetPort(&iPort );
if (NS_SUCCEEDED( rv ) && (iPort >= 0) && (iPort != 80)) { if (NS_SUCCEEDED( rv ) && (iPort >= 0) && (iPort != 80)) {
char *csPortBuffer = nsnull; aURIHostPort.AppendWithConversion( ":" );
aURIHostPort.AppendInt( iPort );
csPortBuffer = PR_smprintf( ":%d", iPort );
if (csPortBuffer) {
aURIHostPort.AppendWithConversion( csPortBuffer );
PR_smprintf_free( csPortBuffer );
}
else {
PR_LOG( gP3PLogModule,
PR_LOG_ERROR,
("P3PService: GetURIComponents, PR_smprintf failed.\n") );
rv = NS_ERROR_OUT_OF_MEMORY;
}
} }
else if (NS_FAILED( rv )) { else if (NS_FAILED( rv )) {
PR_LOG( gP3PLogModule, PR_LOG( gP3PLogModule,
@ -2860,7 +2849,7 @@ nsP3PService::DeleteCookie( nsIURI *aURI,
rv = mCookieService->SetCookieString( aURI, rv = mCookieService->SetCookieString( aURI,
nsnull, nsnull,
sWork ); csCookie );
return rv; return rv;
} }

View File

@ -36,6 +36,7 @@
#include <nsCOMPtr.h> #include <nsCOMPtr.h>
#include <nsISupports.h> #include <nsISupports.h>
#include <nsIComponentManager.h> #include <nsIComponentManager.h>
#include <nsIGenericFactory.h>
#include <nsICategoryManager.h> #include <nsICategoryManager.h>
@ -83,14 +84,16 @@ public:
NS_METHOD Init( ); NS_METHOD Init( );
static static
NS_METHOD CategoryRegister( nsIComponentManager *aComponentManager, NS_METHOD CategoryRegister( nsIComponentManager *aComponentManager,
nsIFile *aPath, nsIFile *aPath,
const char *aRegistryLocation, const char *aRegistryLocation,
const char *aComponentType ); const char *aComponentType,
const nsModuleComponentInfo *aInfo );
static static
NS_METHOD CategoryUnregister( nsIComponentManager *aComponentManager, NS_METHOD CategoryUnregister( nsIComponentManager *aComponentManager,
nsIFile *aPath, nsIFile *aPath,
const char *aRegistryLocation ); const char *aRegistryLocation,
const nsModuleComponentInfo *aInfo );
protected: protected:
NS_METHOD GetDocShellTreeItemMain( nsIDocShellTreeItem *aDocShellTreeItem, NS_METHOD GetDocShellTreeItemMain( nsIDocShellTreeItem *aDocShellTreeItem,