WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
90936
[EFL] Add a API for getting security origin string
https://bugs.webkit.org/show_bug.cgi?id=90936
Summary
[EFL] Add a API for getting security origin string
Kihong Kwon
Reported
2012-07-10 21:43:03 PDT
Application(e.g browser) need to keep permitted origin list for the Web Notification. But We don't have a way to store security origin in the application side. We can support to store security origin by security origin string getter.
Attachments
Patch
(3.61 KB, patch)
2012-07-10 21:53 PDT
,
Kihong Kwon
no flags
Details
Formatted Diff
Diff
Patch
(3.97 KB, patch)
2012-07-13 05:23 PDT
,
Kihong Kwon
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kihong Kwon
Comment 1
2012-07-10 21:53:53 PDT
Created
attachment 151594
[details]
Patch
Chris Dumez
Comment 2
2012-07-10 22:35:53 PDT
Comment on
attachment 151594
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=151594&action=review
> Source/WebKit/efl/ewk/ewk_security_origin.cpp:59 > +const char* ewk_security_origin_string_get(Ewk_Security_Origin *origin)
star should be next to Ewk_Security_Origin, not origin.
> Source/WebKit/efl/ewk/ewk_security_origin.h:78 > + * Returns the security origin string from Ewk_Security_Origin.
Returns the string representation of the security origin?
> Source/WebKit/efl/ewk/ewk_security_origin.h:79 > + *
It would be nice to copy the doc from WebCore here to provide more information: e.g. "Convert this SecurityOrigin into a string. The string representation of a SecurityOrigin is similar to a URL, except it lacks a path component. The string representation does not encode the value of the security origin's domain property". We should document that it may return the string "null" when the security origin is unique (check WebCore::SecurityOrigin::toString() documentation for more details).
> Source/WebKit/efl/ewk/ewk_security_origin.h:82 > + * @return url stirng from Ewk_Securiry_Origin.
It does not necessarily return a URL and there is a type in "string". I would use "String representation of the security origin".
> Source/WebKit/efl/ewk/ewk_security_origin.h:84 > +EAPI const char *ewk_security_origin_string_get(Ewk_Security_Origin *o);
Argument should be const.
Kihong Kwon
Comment 3
2012-07-10 22:58:06 PDT
Comment on
attachment 151594
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=151594&action=review
>> Source/WebKit/efl/ewk/ewk_security_origin.cpp:59 >> +const char* ewk_security_origin_string_get(Ewk_Security_Origin *origin) > > star should be next to Ewk_Security_Origin, not origin.
OK.
>> Source/WebKit/efl/ewk/ewk_security_origin.h:78 >> + * Returns the security origin string from Ewk_Security_Origin. > > Returns the string representation of the security origin?
OK. Thanks.
>> Source/WebKit/efl/ewk/ewk_security_origin.h:84 >> +EAPI const char *ewk_security_origin_string_get(Ewk_Security_Origin *o); > > Argument should be const.
It can't be. Argument can be changed in the ewk_security_origin_string_get.
Chris Dumez
Comment 4
2012-07-10 23:01:19 PDT
Comment on
attachment 151594
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=151594&action=review
>>> Source/WebKit/efl/ewk/ewk_security_origin.h:84 >>> +EAPI const char *ewk_security_origin_string_get(Ewk_Security_Origin *o); >> >> Argument should be const. > > It can't be. > Argument can be changed in the ewk_security_origin_string_get.
Sure it can. It is a getter so the argument MUST be const. I believe you're having trouble because of the estringshare optimization. For that, just use const_cast.
Kihong Kwon
Comment 5
2012-07-13 05:23:00 PDT
Created
attachment 152224
[details]
Patch
Chris Dumez
Comment 6
2012-07-13 05:26:33 PDT
Comment on
attachment 152224
[details]
Patch LGTM.
Gyuyoung Kim
Comment 7
2012-07-15 19:44:19 PDT
Comment on
attachment 152224
[details]
Patch LGTM, thanks.
WebKit Review Bot
Comment 8
2012-07-15 20:22:47 PDT
Comment on
attachment 152224
[details]
Patch Clearing flags on attachment: 152224 Committed
r122693
: <
http://trac.webkit.org/changeset/122693
>
WebKit Review Bot
Comment 9
2012-07-15 20:22:52 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug