Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 62436 - Expose Cookies functionality to java
: Expose Cookies functionality to java
Product: Core Graveyard
Classification: Graveyard
Component: Java APIs to WebShell (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: ---
Assigned To: edburns
: Alexei V. Mokeev
Depends on:
  Show dependency treegraph
Reported: 2000-12-09 14:16 PST by edburns
Modified: 2012-04-09 22:27 PDT (History)
2 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

tar.gz, checkpoint. Implements webclient side of part 2. (25.85 KB, application/octet-stream)
2000-12-09 14:17 PST, edburns
no flags Details
tar.gz, final implementation of UniversalDialog support. (28.79 KB, application/octet-stream)
2000-12-11 12:36 PST, edburns
no flags Details
tar.gz checkpoint, prefs part. (10.99 KB, application/octet-stream)
2000-12-11 15:30 PST, edburns
no flags Details
tar.gz, woking first iteration of prefs, Can setPrefs! (20.95 KB, application/octet-stream)
2000-12-11 18:38 PST, edburns
no flags Details
Set/Get cookie functionality (20.72 KB, application/octet-stream)
2001-06-27 23:14 PDT, sizera
no flags Details

Description edburns 2000-12-09 14:16:08 PST
There are three parts to this.

1. Prefs.  Make it so the user can set cookie prefs

2. Make it so the user can be prompted when the server wishes to set a cookie, 
if the prefs say that the user wants to be prompted.

3. Enable the custom app to set cookies.
Comment 1 edburns 2000-12-09 14:17:46 PST
Created attachment 20420 [details]
tar.gz, checkpoint.  Implements webclient side of part 2.
Comment 2 edburns 2000-12-11 12:36:57 PST
Created attachment 20484 [details]
tar.gz, final implementation of UniversalDialog support.
Comment 3 edburns 2000-12-11 12:43:21 PST
How to test this bug.

1. Remove your .mozilla directory, or equivalent

1.5 Set up the proxy preferences so you can get to

2. Start mozilla and go to Edit-Preferences->Advanced->Cookies.

3. Remove all Cookies

4. Accept all cookies, and warn me before accepting cookes

5. Stop mozilla.

Start webclient and visit
<>, then enter
your bugzilla userid and password.  A Confirm dialog should come up.
Make sure that the dialog does the right thing, that is, if you accept
the cookie, exit webclient, start up mozilla, and use the cookie viewer
to see that the cookie is there.  Please note that you see the Enter a
bug page whether you accept the cookie or not.

A classes_spec/org/mozilla/webclient/
M classes_spec/org/mozilla/webclient/
M classes_spec/org/mozilla/webclient/
M classes_spec/org/mozilla/webclient/test/
M classes_spec/org/mozilla/webclient/test/
A classes_spec/org/mozilla/webclient/test/
M src_moz/CBrowserContainer.cpp
M src_moz/
A src_moz/PromptActionEvents.cpp
A src_moz/PromptActionEvents.h
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h
Comment 4 edburns 2000-12-11 15:30:50 PST
Created attachment 20494 [details]
tar.gz checkpoint, prefs part.
Comment 5 edburns 2000-12-11 18:38:43 PST
Created attachment 20509 [details]
tar.gz, woking first iteration of prefs, Can setPrefs!
Comment 6 Ashu Kulkarni 2000-12-12 12:32:17 PST
tested on Solaris - r=ashuk
Comment 7 Ashu Kulkarni 2000-12-12 14:40:16 PST
Diff of changes needed in src_moz/motif/NativeLoaderStub.cpp for code to work on


ashuk@versailles[147]>diff NativeLoaderStub.cpp
< void (* nativeSetUnicharPref) (JNIEnv *env, jobject obj, jstring, jstring);
< void (* nativeSetIntPref) (JNIEnv *env, jobject obj, jstring, jint);
< void (* nativeSetBoolPref) (JNIEnv *env, jobject obj, jstring, jboolean);
> void (* nativeSetUnicharPref) (JNIEnv *, jobject, jstring, jstring);
> void (* nativeSetIntPref) (JNIEnv *, jobject, jstring, jint);
> void (* nativeSetBoolPref) (JNIEnv *, jobject, jstring, jboolean);
<   nativeSetUnicharPref = (void (*) (JNIEnv *env, jobject obj, jstring,
jstring)) dlsym(dll,
>   nativeSetUnicharPref = (void (*) (JNIEnv *, jobject, jstring, jstring))
<   nativeSetIntPref = (void (*) (JNIEnv *env, jobject obj, jstring, jint))
>   nativeSetIntPref = (void (*) (JNIEnv *, jobject, jstring, jint)) dlsym(dll,
<   nativeSetBoolPref = (void (*) (JNIEnv *env, jobject obj, jstring, jboolean))
>   nativeSetBoolPref = (void (*) (JNIEnv *, jobject, jstring, jboolean))


Ed, pls review.

Comment 8 sizera 2001-06-27 23:14:23 PDT
Created attachment 40435 [details]
Set/Get cookie functionality
Comment 9 sizera 2001-06-27 23:20:04 PDT
I have had a go at implementing part 3 of this (Enable the custom app to set 
cookies). I have only implemented Cookies.setCookieString and 
Cookies.getCookieString. This seems to work for me so hopefully it might turn 
out to be useful for an addition to webclient.

I am not too sure about the prompt parameter in CookiesActionEvents.cpp for the 
call to nsICookieServices.setCookieString. I have left it to nsnull for now.

Note You need to log in before you can comment on or make changes to this bug.