Files
rk35xx-android14/external/cronet/components/metrics/metrics_log_manager.cc
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

32 lines
840 B
C++

// 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.
#include "components/metrics/metrics_log_manager.h"
#include <algorithm>
#include <utility>
#include "base/strings/string_util.h"
#include "components/metrics/metrics_log.h"
#include "components/metrics/metrics_log_store.h"
#include "components/metrics/metrics_pref_names.h"
namespace metrics {
MetricsLogManager::MetricsLogManager() = default;
MetricsLogManager::~MetricsLogManager() = default;
void MetricsLogManager::BeginLoggingWithLog(std::unique_ptr<MetricsLog> log) {
DCHECK(!current_log_);
current_log_ = std::move(log);
}
std::unique_ptr<MetricsLog> MetricsLogManager::ReleaseCurrentLog() {
DCHECK(current_log_);
return std::move(current_log_);
}
} // namespace metrics