def convert_chrome_cookie(cookie):
    """Convert a cookie from Chrome to a CookieJar format type"""
    return {
        'name': cookie['name'],
        'value': cookie['value'],
        'domain': cookie['domain'],
        'path': cookie['path'],
        'secure': cookie['secure'],
        'expires': int(cookie['expires']) if cookie['expires'] != -1 else None,
        'rest': {'HttpOnly': True if cookie['httpOnly'] else None}
    }