Permalink
Browse files

Merge pull request #22 from oconnor663/master

Exposing the complete SetCookie interface
  • Loading branch information...
2 parents 25379bf + abaa209 commit 8b1506e36c96d7f1f3174a982c2df46c30da43d7 @ataranto committed Apr 30, 2012
Showing with 11 additions and 5 deletions.
  1. +11 −5 CefSharp/CefSharp.h
View
@@ -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;
@@ -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;
@@ -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);

0 comments on commit 8b1506e

Please sign in to comment.