chromium/components/autofill/core/common/autofill_internals/log_message.h

// Copyright 2019 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_COMMON_AUTOFILL_INTERNALS_LOG_MESSAGE_H_
#define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_INTERNALS_LOG_MESSAGE_H_

namespace autofill {

class LogBuffer;

/////////////// Log Messages /////////////

// Generator for log message. If you need to find the call site for a log
// message, take the first parameter (e.g. ParsedForms) and search for
// that name prefixed with a k (e.g. kParsedForms) in code search.
#define AUTOFILL_LOG_MESSAGE_TEMPLATES(T)

// Log messages for chrome://autofill-internals.

#define AUTOFILL_TEMPLATE
enum class LogMessage {};
#undef AUTOFILL_TEMPLATE

// Returns the enum value of |message| as a string (without the leading k).
const char* LogMessageToString(LogMessage message);
// Returns the actual string to be presented to the user for |message|.
const char* LogMessageValue(LogMessage message);

LogBuffer& operator<<(LogBuffer& buf, LogMessage message);

}  // namespace autofill

#endif  // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_INTERNALS_LOG_MESSAGE_H_