Skip to content
  • anilsson@rim.com's avatar
    [BlackBerry] Add cookie database API · 117cd7a8
    anilsson@rim.com authored
    https://bugs.webkit.org/show_bug.cgi?id=97102
    
    Reviewed by Antonio Gomes.
    
    Source/WebCore:
    
    Add a CookieManager method that takes a list of strings to parse
    instead of just one string. Expose CookieParser::parseOneCookie.
    
    Reviewed internally by Otto D. Cheung.
    
    No change in behavior, no new tests.
    
    * platform/blackberry/CookieManager.cpp:
    (WebCore::CookieManager::setCookies):
    (WebCore):
    * platform/blackberry/CookieManager.h:
    * platform/blackberry/CookieParser.cpp:
    (WebCore::CookieParser::parseOneCookie):
    (WebCore):
    * platform/blackberry/CookieParser.h:
    (CookieParser):
    
    Source/WebKit:
    
    Add cookie database file to build system.
    
    Reviewed internally by Otto D. Cheung.
    
    * PlatformBlackBerry.cmake:
    
    Source/WebKit/blackberry:
    
    The cookie database is exposed through WebCookieJar, which has only two
    methods: cookies() and setCookies().
    
    Also add a new WebString::fromUTF8 overload that takes a const char*
    and a length, in order to avoid a strlen call when converting from
    other string classes to WebString. This is useful for callers of the
    new cookie API when converting cookies to WebString.
    
    Reviewed internally by Otto D. Cheung.
    
    PR 209282
    
    * Api/WebCookieJar.cpp: Added.
    (WebKit):
    (BlackBerry::WebKit::WebCookieJar::WebCookieJar):
    (BlackBerry::WebKit::WebCookieJar::cookies):
    (BlackBerry::WebKit::WebCookieJar::setCookies):
    * Api/WebCookieJar.h: Added.
    (WebKit):
    * Api/WebPage.cpp:
    (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
    (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
    (BlackBerry::WebKit::WebPage::cookieJar):
    (WebKit):
    * Api/WebPage.h:
    (WebKit):
    * Api/WebPage_p.h:
    (WebKit):
    (WebPagePrivate):
    * Api/WebString.cpp:
    (BlackBerry::WebKit::WebString::fromUtf8):
    (WebKit):
    * Api/WebString.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    117cd7a8