diff --git a/mozilla/privacy/public/privacy.h b/mozilla/privacy/public/privacy.h index 8211872f783..ce715a07a43 100644 --- a/mozilla/privacy/public/privacy.h +++ b/mozilla/privacy/public/privacy.h @@ -45,9 +45,16 @@ PRVCY_GetCurrentPrivacyPolicyURL(MWContext * ctxt); extern Bool PRVCY_PrivacyPolicyConfirmSubmit(MWContext *ctxt, LO_FormElementStruct *form_element); + extern char * PRVCY_TutorialURL(); +extern void +PRVCY_ToggleAnonymous(); + +extern Bool +PRVCY_IsAnonymous(); + XP_END_PROTOS #endif /* !_PRIVACY_H */ diff --git a/mozilla/privacy/src/privacy.c b/mozilla/privacy/src/privacy.c index 2b5b815d075..d72471e9699 100644 --- a/mozilla/privacy/src/privacy.c +++ b/mozilla/privacy/src/privacy.c @@ -161,10 +161,33 @@ PRVCY_PrivacyPolicyConfirmSubmit(MWContext *ctxt, } /* - Return the URL of the privacy tutorial + Returns the URL of the privacy tutorial */ PUBLIC char * PRVCY_TutorialURL() { return "http://people.netscape.com/morse/privacy/index.html"; } + +PRIVATE Bool anonymous = FALSE; + +/* + Toggles the anonymous state +*/ +PUBLIC void +PRVCY_ToggleAnonymous() { + if (anonymous) { + NET_UnanonymizeCookies(); + } else { + NET_AnonymizeCookies(); + } + anonymous = !anonymous; +} + +/* + Returns the anonymous state +*/ +PUBLIC Bool +PRVCY_IsAnonymous() { + return anonymous; +}