chromium/components/autofill/core/browser/logging/log_router.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_LOGGING_LOG_ROUTER_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_LOGGING_LOG_ROUTER_H_

#include <string>
#include <vector>

#include "base/observer_list.h"
#include "base/scoped_observation_traits.h"
#include "base/values.h"
#include "components/autofill/core/browser/logging/text_log_receiver.h"
#include "components/keyed_service/core/keyed_service.h"

namespace autofill {

class RoutingLogManager;
class LogReceiver;

// The router stands between LogManager and LogReceiver instances. Both managers
// and receivers need to register (and unregister) with the router. After that,
// the following communication is enabled:
//   * LogManagers are notified when logging starts or stops being possible
//   * LogReceivers are sent logs routed through LogRouter
class LogRouter : public KeyedService {};

}  // namespace autofill

namespace base {

template <>
struct ScopedObservationTraits<autofill::LogRouter, autofill::LogReceiver> {};

}  // namespace base

#endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_LOGGING_LOG_ROUTER_H_