Changeset 122693 in webkit


Ignore:
Timestamp:
Jul 15, 2012 8:22:36 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Add a API for getting security origin string
https://bugs.webkit.org/show_bug.cgi?id=90936

Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-07-15
Reviewed by Ryosuke Niwa.

Support to change from Ewk_Security_Origin to string on the API level.
Add ewk_security_origin_string_get for getting security origin string.

  • ewk/ewk_security_origin.cpp:

(_Ewk_Security_Origin):
(ewk_security_origin_string_get):
(ewk_security_origin_free):
(ewk_security_origin_new):

  • ewk/ewk_security_origin.h:
Location:
trunk/Source/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r122688 r122693  
     12012-07-15  Kihong Kwon  <kihong.kwon@samsung.com>
     2
     3        [EFL] Add a API for getting security origin string
     4        https://bugs.webkit.org/show_bug.cgi?id=90936
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Support to change from Ewk_Security_Origin to string on the API level.
     9        Add ewk_security_origin_string_get for getting security origin string.
     10
     11        * ewk/ewk_security_origin.cpp:
     12        (_Ewk_Security_Origin):
     13        (ewk_security_origin_string_get):
     14        (ewk_security_origin_free):
     15        (ewk_security_origin_new):
     16        * ewk/ewk_security_origin.h:
     17
    1182012-07-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    219
  • trunk/Source/WebKit/efl/ewk/ewk_security_origin.cpp

    r122564 r122693  
    3838    const char* protocol;
    3939    const char* host;
     40    const char* originString;
    4041};
    4142
     
    5051    EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0);
    5152    return origin->host;
     53}
     54
     55const char* ewk_security_origin_string_get(const Ewk_Security_Origin* origin)
     56{
     57    EINA_SAFETY_ON_NULL_RETURN_VAL(origin, 0);
     58    return origin->originString;
    5259}
    5360
     
    116123    eina_stringshare_del(origin->host);
    117124    eina_stringshare_del(origin->protocol);
     125    eina_stringshare_del(origin->originString);
    118126
    119127    delete origin;
     
    141149    origin->protocol = eina_stringshare_add(coreOrigin->protocol().utf8().data());
    142150    origin->host = eina_stringshare_add(coreOrigin->host().utf8().data());
     151    origin->originString = eina_stringshare_add(origin->securityOrigin->toString().utf8().data());
    143152
    144153    return origin;
  • trunk/Source/WebKit/efl/ewk/ewk_security_origin.h

    r122564 r122693  
    6565 */
    6666EAPI const char          *ewk_security_origin_host_get(const Ewk_Security_Origin *o);
     67
     68/**
     69 * Convert this Ewk_Security_Origin into a string.
     70 * The string representation of a security origin is similar to a URL, except it lacks a path component.
     71 * The string representation does not encode the value of the security origin's domain property.
     72 *
     73 * @param o security origin object
     74 *
     75 * @return the string representation of security origin or @c 0 if there is not a proper security origin scheme
     76 */
     77EAPI const char          *ewk_security_origin_string_get(const Ewk_Security_Origin *o);
    6778
    6879/**
     
    159170EAPI Ewk_Security_Origin *ewk_security_origin_new_from_string(const char *url);
    160171
    161 
    162172#ifdef __cplusplus
    163173}
Note: See TracChangeset for help on using the changeset viewer.