// Copyright 2015 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_MANAGER_H_ #define COMPONENTS_AUTOFILL_CORE_BROWSER_LOGGING_LOG_MANAGER_H_ #include <concepts> #include <memory> #include "base/functional/callback.h" #include "base/types/pass_key.h" #include "components/autofill/core/browser/logging/log_buffer_submitter.h" #include "components/autofill/core/common/logging/log_macros.h" namespace base { class Value; } namespace autofill { class LogRouter; class RoutingLogManager; class BufferingLogManager; // This interface is used by the password management code to receive and display // logs about progress of actions like saving a password. class LogManager { … }; // This LogManager subclass can be connected to a LogRouter, which in turn // passes logs to LogReceivers. class RoutingLogManager : public LogManager { … }; // This LogManager subclass stores logs in a buffer, which can eventually be // flushed to another LogManager. It facilitates logging across in sequences // outside of the main thread in a thread-safe way. class BufferingLogManager : public LogManager { … }; inline LogBuffer::IsActive IsLoggingActive(LogManager* log_manager) { … } namespace internal { // Traits for LOG_AF() macro for `LogManager*`. LoggerTraits<T>; // Traits for LOG_AF() macro for `LogManager&`. LoggerTraits<T>; } // namespace internal } // namespace autofill #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_LOGGING_LOG_MANAGER_H_