chromium/components/optimization_guide/core/optimization_guide_logger.cc

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

#include "components/optimization_guide/core/optimization_guide_logger.h"

#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/observer_list.h"
#include "base/strings/strcat.h"
#include "components/optimization_guide/core/hints_processing_util.h"
#include "components/optimization_guide/core/optimization_guide_switches.h"

namespace {

// TODO(rajendrant): Verify if all debug messages before browser startup are
// getting saved without being dropped, when some hints fetching and model
// downloading happens.
constexpr size_t kMaxRecentLogMessages =;

}  // namespace

OptimizationGuideLogger::LogMessageBuilder::LogMessageBuilder(
    optimization_guide_common::mojom::LogSource log_source,
    const std::string& source_file,
    int source_line,
    OptimizationGuideLogger* optimization_guide_logger)
    :{}

OptimizationGuideLogger::LogMessageBuilder::~LogMessageBuilder() {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(const char* message) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(
    const std::string& message) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(const GURL& url) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(
    optimization_guide::proto::RequestContext request_context) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(
    optimization_guide::proto::OptimizationType optimization_type) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(
    optimization_guide::OptimizationTypeDecision optimization_type_decision) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(
    optimization_guide::OptimizationGuideDecision optimization_guide_decision) {}

OptimizationGuideLogger::LogMessageBuilder&
OptimizationGuideLogger::LogMessageBuilder::operator<<(
    optimization_guide::proto::OptimizationTarget optimization_target) {}

OptimizationGuideLogger::LogMessage::LogMessage(
    base::Time event_time,
    optimization_guide_common::mojom::LogSource log_source,
    const std::string& source_file,
    int source_line,
    const std::string& message)
    :{}

// static
OptimizationGuideLogger* OptimizationGuideLogger::GetInstance() {}

OptimizationGuideLogger::OptimizationGuideLogger()
    :{}

OptimizationGuideLogger::~OptimizationGuideLogger() = default;

void OptimizationGuideLogger::AddObserver(
    OptimizationGuideLogger::Observer* observer) {}

void OptimizationGuideLogger::RemoveObserver(
    OptimizationGuideLogger::Observer* observer) {}

void OptimizationGuideLogger::OnLogMessageAdded(
    base::Time event_time,
    optimization_guide_common::mojom::LogSource log_source,
    const std::string& source_file,
    int source_line,
    const std::string& message) {}

bool OptimizationGuideLogger::ShouldEnableDebugLogs() const {}