Bug 32559

Summary: [Android] Android needs implementation of setCookies, cookies and cookiesEnabled functions.
Product: WebKit Reporter: Andrei Popescu <andreip>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: android-webkit-unforking, commit-queue, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Android   
OS: Android   
Attachments:
Description Flags
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.
fishd: review-
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.
none
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug. none

Description Andrei Popescu 2009-12-15 07:08:07 PST
Android needs implementation of  setCookies, cookies and cookiesEnabled functions. The cookie functionality is on the Java side so we need to proxy to it via the PlatformBridge iface.
Comment 1 Andrei Popescu 2009-12-15 11:21:20 PST
Created attachment 44889 [details]
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.
Comment 2 WebKit Review Bot 2009-12-15 11:26:10 PST
Attachment 44889 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/platform/network/android/Cookie.cpp:28:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 1
Comment 3 Darin Fisher (:fishd, Google) 2009-12-15 11:30:10 PST
Comment on attachment 44889 [details]
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.

> Index: WebCore/platform/network/android/AuthenticationChallenge.h
...
> +class ResourceHandle;

^^^ This forward declaration is unnecessary.


> Index: WebCore/platform/network/android/Cookie.cpp

^^^ This file should be named CookieJarAndroid.cpp to stick with conventions.


> +#include "config.h"
> +

^^^ please include CookieJar.h here.


> +#include "PlatformBridge.h"
> +
> +namespace WebCore {
> +
> +class Document;

^^^ no need for Document forward declare if you include CookieJar.h
Comment 4 Andrei Popescu 2009-12-15 11:44:04 PST
Created attachment 44894 [details]
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.
Comment 5 Andrei Popescu 2009-12-15 11:45:10 PST
(In reply to comment #3)
> (From update of attachment 44889 [details])
> > Index: WebCore/platform/network/android/AuthenticationChallenge.h
> ...
> > +class ResourceHandle;
> 
> ^^^ This forward declaration is unnecessary.
> 

Removed.

> 
> > Index: WebCore/platform/network/android/Cookie.cpp
> 
> ^^^ This file should be named CookieJarAndroid.cpp to stick with conventions.
>

Done.
 
> 
> > +#include "config.h"
> > +
> 
> ^^^ please include CookieJar.h here.
>

Included.
 
> 
> > +#include "PlatformBridge.h"
> > +
> > +namespace WebCore {
> > +
> > +class Document;
> 
> ^^^ no need for Document forward declare if you include CookieJar.h

Removed.

Thanks,
Andrei
Comment 6 Andrei Popescu 2009-12-15 11:46:41 PST
But forgot the PlatformBridge.h changed in the new patch. Uploading new patch...
Comment 7 WebKit Review Bot 2009-12-15 11:48:29 PST
style-queue ran check-webkit-style on attachment 44894 [details] without any errors.
Comment 8 Andrei Popescu 2009-12-15 11:52:11 PST
Created attachment 44895 [details]
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.
Comment 9 WebKit Review Bot 2009-12-15 11:53:55 PST
style-queue ran check-webkit-style on attachment 44895 [details] without any errors.
Comment 10 Andrei Popescu 2009-12-18 02:56:47 PST
ping?
Comment 11 Adam Barth 2009-12-18 15:18:52 PST
Comment on attachment 44895 [details]
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.

I guess you're not implementing third-party cookie blocking?  If you decide to do that later, you'll need to revise this code.
Comment 12 WebKit Commit Bot 2009-12-20 01:53:03 PST
Comment on attachment 44895 [details]
Add implementation of cookie functions, AuthenticationChallenge and fix a small bug.

Clearing flags on attachment: 44895

Committed r52406: <http://trac.webkit.org/changeset/52406>
Comment 13 WebKit Commit Bot 2009-12-20 01:53:08 PST
All reviewed patches have been landed.  Closing bug.