mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
// Copyright Š 2010-2014 The CefSharp Authors. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "Stdafx.h"
|
|
#include "CookieVisitor.h"
|
|
|
|
using namespace System::Net;
|
|
|
|
namespace CefSharp
|
|
{
|
|
bool CookieVisitor::Visit(const CefCookie& cefCookie, int count, int total, bool& deleteCookie)
|
|
{
|
|
Cookie^ cookie = gcnew Cookie();
|
|
cookie->Name = StringUtils::ToClr(cefCookie.name);
|
|
cookie->Value = StringUtils::ToClr(cefCookie.value);
|
|
cookie->Domain = StringUtils::ToClr(cefCookie.domain);
|
|
cookie->Path = StringUtils::ToClr(cefCookie.path);
|
|
cookie->Secure = cefCookie.secure;
|
|
cookie->HttpOnly = cefCookie.httponly;
|
|
|
|
if (cefCookie.has_expires)
|
|
{
|
|
cookie->Expires = DateTime(
|
|
cefCookie.expires.year,
|
|
cefCookie.expires.month,
|
|
cefCookie.expires.day_of_month,
|
|
cefCookie.expires.hour,
|
|
cefCookie.expires.minute,
|
|
cefCookie.expires.second,
|
|
cefCookie.expires.millisecond);
|
|
}
|
|
|
|
return _visitor->Visit(cookie, count, total, deleteCookie);
|
|
}
|
|
} |