Bug 55258

Summary: [EFL] API for application cache database directory path moved from ewk_view to ewk_setting because of wrong logic
Product: WebKit Reporter: Lukasz Slachciak <l.slachciak>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: gyuyoung.kim, kenneth, leandro, ryuan.choi, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
API for application cache database directory
none
API for application cache database directory none

Description Lukasz Slachciak 2011-02-25 13:57:27 PST
In ewk_view.cpp there is an API for setting and getting application cache directory path.
It is wrong approach because in one WebKit instance only one cache directory path can be set with:
WebCore::cacheStorage().setCacheDirectory().
Allowing to set this for each view was misleading because it was changing path in other views also

Attached patch fixes this problem proposing new API in ewk_settings.h:

EAPI void             ewk_settings_application_cache_path_set(const char *path);
EAPI const char      *ewk_settings_application_cache_path_get();
Comment 1 Lukasz Slachciak 2011-02-25 14:02:37 PST
Created attachment 83871 [details]
API for application cache database directory
Comment 2 Gyuyoung Kim 2011-02-25 22:27:13 PST
Comment on attachment 83871 [details]
API for application cache database directory

View in context: https://bugs.webkit.org/attachment.cgi?id=83871&action=review

> Source/WebKit/efl/ChangeLog:5
> +        API for application cache database directory path moved from ewk_view to ewk_settings

Please sync with bug title.

> Source/WebKit/efl/ChangeLog:6
> +

Please add bug url

> Source/WebKit/efl/ewk/ewk_settings.cpp:147
> +        eina_stringshare_replace(&_ewk_application_cache_database_path, path);

We should prepare that the "OFFLINE_WEB_APPLICATIONS" is disabled,
For example,

#else
    return;
#endif

> Source/WebKit/efl/ewk/ewk_settings.cpp:164
> +    return _ewk_application_cache_database_path;

Same with above.
Comment 3 Lukasz Slachciak 2011-02-26 00:50:04 PST
Created attachment 83931 [details]
API for application cache database directory
Comment 4 Lukasz Slachciak 2011-02-26 00:51:58 PST
Thank you Gyuyoung for comments. I followed them.
Comment 5 Ryuan Choi 2011-02-27 20:19:08 PST
I am sorry about late answer.
It looks duplicated with https://bugs.webkit.org/show_bug.cgi?id=52139
Comment 6 Lukasz Slachciak 2011-02-28 03:36:11 PST

*** This bug has been marked as a duplicate of bug 52139 ***
Comment 7 Lukasz Slachciak 2011-02-28 03:39:04 PST
Thank you Ryuan for comment. I resolved this bug as duplicate, but please take care about adding  #if ENABLE(OFFLINE_WEB_APPLICATIONS) in your patch
Comment 8 Eric Seidel (no email) 2011-03-08 09:46:56 PST
Comment on attachment 83931 [details]
API for application cache database directory

Cleared review? from attachment 83931 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).