'Adds data necessary for Horizon to function to the request.'

def process_request(self, request):

    request.horizon = {'dashboard': None, 'panel': None, 'async_messages': []}
    if ((not hasattr(request, 'user')) or (not request.user.is_authenticated())):
        return None
    if request.is_ajax():
        return None
    if (settings.SESSION_ENGINE == 'django.contrib.sessions.backends.signed_cookies'):
        max_cookie_size = getattr(settings, 'SESSION_COOKIE_MAX_SIZE', None)
        session_cookie_name = getattr(settings, 'SESSION_COOKIE_NAME', None)
        session_key = request.COOKIES.get(session_cookie_name)
        if ((max_cookie_size is not None) and (session_key is not None)):
            cookie_size = sum(((len(key) + len(value)) for (key, value) in request.COOKIES.items()))
            if (cookie_size >= max_cookie_size):
                LOG.error('Total    Cookie    size    for    user_id:    %(user_id)s    is    %(cookie_size)sB    >=    %(max_cookie_size)sB.    You    need    to    configure    file-based    or    database-backed    sessions    instead    of    cookie-based    sessions:    http://docs.openstack.org/developer/horizon/topics/deployment.html#session-storage', {'user_id': request.session.get('user_id', 'Unknown'), 'cookie_size': cookie_size, 'max_cookie_size': max_cookie_size})
    tz = utils.get_timezone(request)
    if tz:
        timezone.activate(tz)
