Summary: | [EFL] Sets the persistent storage for cookies in MiniBrowser | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jinwoo Song <jinwoo7.song> | ||||||||
Component: | WebKit EFL | Assignee: | Jinwoo Song <jinwoo7.song> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, g.czajkowski, lucas.de.marchi | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Jinwoo Song
2014-08-12 22:54:04 PDT
Created attachment 236499 [details]
Patch
Comment on attachment 236499 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236499&action=review > Tools/MiniBrowser/efl/main.c:2106 > ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), parse_cookies_policy(cookies_policy_string)); parse_cookies_policy() is called twice. So, how about changing as below ? if (cookies_policy_string) { Ewk_Cookie_Accept_Policy cookie_policy = parse_cookies_policy(cookies_policy_string); ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), cookie_policy); if (cookie_policy == EWK_COOKIE_ACCEPT_POLICY_ALWAYS) { char storageDirectory[] = "/tmp/ewebkit2_minibrowser_cookie"; mkdir(storageDirectory, S_IRWXU); char textStorage[64]; snprintf(textStorage, sizeof(textStorage), "%s/txt-cookie", storageDirectory); ewk_cookie_manager_persistent_storage_set(ewk_context_cookie_manager_get(context), textStorage, EWK_COOKIE_PERSISTENT_STORAGE_TEXT); } } Comment on attachment 236499 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236499&action=review > Tools/MiniBrowser/efl/main.c:2108 > + if (parse_cookies_policy(cookies_policy_string) == EWK_COOKIE_ACCEPT_POLICY_ALWAYS) { parse_cookies_policy() assumes non-null string. I also suggest merging this block with above one. > Tools/MiniBrowser/efl/main.c:2109 > + char storageDirectory[] = "/tmp/ewebkit2_minibrowser_cookie"; 1) nit: const, 2) cookieStorageDirectory ? 3) Would be nice to end the string with '/' as this is directory. > Tools/MiniBrowser/efl/main.c:2111 > + char textStorage[64]; storageName ? Created attachment 236503 [details]
Patch
Applied Gyuyoung's comment.
Created attachment 236512 [details]
Patch
Applied Grzeg's comments.
Thanks for the changes. LGTM as well Comment on attachment 236512 [details] Patch Clearing flags on attachment: 236512 Committed r172519: <http://trac.webkit.org/changeset/172519> All reviewed patches have been landed. Closing bug. |