chromium/remoting/host/native_messaging/log_message_handler.cc

// 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.

#include "remoting/host/native_messaging/log_message_handler.h"

#include "base/functional/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/synchronization/lock.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"

namespace remoting {

namespace {
// Log message handler registration and deregistration is not thread-safe.
// This lock must be held in order to set or restore a log message handler,
// and when accessing the pointer to the LogMessageHandler instance.
base::LazyInstance<base::Lock>::Leaky g_log_message_handler_lock =;

// The singleton LogMessageHandler instance, or null if log messages are not
// being intercepted. It must be dereferenced and updated under the above lock.
LogMessageHandler* g_log_message_handler =;
}  // namespace

LogMessageHandler::LogMessageHandler(const Delegate& delegate)
    :{}

LogMessageHandler::~LogMessageHandler() {}

// static
const char* LogMessageHandler::kDebugMessageTypeName =;

// static
bool LogMessageHandler::OnLogMessage(logging::LogSeverity severity,
                                     const char* file,
                                     int line,
                                     size_t message_start,
                                     const std::string& str) {}

void LogMessageHandler::PostLogMessageToCorrectThread(
    logging::LogSeverity severity,
    const char* file,
    int line,
    size_t message_start,
    const std::string& str) {}

void LogMessageHandler::SendLogMessageToClient(logging::LogSeverity severity,
                                               const char* file,
                                               int line,
                                               size_t message_start,
                                               const std::string& str) {}

}  // namespace remoting