chromium/mojo/public/cpp/system/data_pipe_utils.cc

// 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 "mojo/public/cpp/system/data_pipe_utils.h"

#include <utility>

#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "mojo/public/cpp/system/wait.h"

namespace mojo {
namespace {

bool BlockingCopyHelper(
    ScopedDataPipeConsumerHandle source,
    base::RepeatingCallback<size_t(base::span<const uint8_t>)> write_bytes) {}

size_t CopyToStringHelper(std::string* result,
                          base::span<const uint8_t> buffer) {}

}  // namespace

// TODO(hansmuller): Add a max_size parameter.
bool BlockingCopyToString(ScopedDataPipeConsumerHandle source,
                          std::string* result) {}

bool MOJO_CPP_SYSTEM_EXPORT
BlockingCopyFromString(const std::string& source_str,
                       const ScopedDataPipeProducerHandle& destination) {}

}  // namespace mojo