Skip to content

Commit

Permalink
Merge pull request #22 from oconnor663/master
Browse files Browse the repository at this point in the history
Exposing the complete SetCookie interface
  • Loading branch information
ataranto committed Apr 30, 2012
2 parents 25379bf + abaa209 commit 8b1506e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions CefSharp/CefSharp.h
Expand Up @@ -118,8 +118,8 @@ namespace CefSharp
_boundObjects[name] = objectToBind;
return true;
}
static bool SetCookie(String^ url, String^ domain, String^ name, String^ value, DateTime expires)

static bool SetCookie(String^ url, String^ name, String^ value, String^ domain, String^ path, bool secure, bool httponly, bool has_expires, DateTime expires)
{
msclr::lock l(_sync);
_result = false;
Expand All @@ -128,9 +128,10 @@ namespace CefSharp
assignFromString(cookie.name, name);
assignFromString(cookie.value, value);
assignFromString(cookie.domain, domain);
assignFromString(cookie.path, "/");

cookie.has_expires = true;
assignFromString(cookie.path, path);
cookie.secure = secure;
cookie.httponly = httponly;
cookie.has_expires = has_expires;
cookie.expires.year = expires.Year;
cookie.expires.month = expires.Month;
cookie.expires.day_of_month = expires.Day;
Expand All @@ -149,6 +150,11 @@ namespace CefSharp
return _result;
}

static bool SetCookie(String^ url, String^ domain, String^ name, String^ value, DateTime expires)
{
return SetCookie(url, name, value, domain, "/", false, false, true, expires);
}

static bool DeleteCookies(String^ url, String^ name)
{
msclr::lock l(_sync);
Expand Down

0 comments on commit 8b1506e

Please sign in to comment.