chromium/third_party/crashpad/crashpad/util/file/file_writer.cc

// Copyright 2014 The Crashpad Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "util/file/file_writer.h"

#include <limits.h>
#include <stddef.h>
#include <string.h>

#include <algorithm>

#include "base/check_op.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "build/build_config.h"
#include "util/misc/implicit_cast.h"

#if BUILDFLAG(IS_POSIX)
#include <sys/uio.h>
#include <unistd.h>
#include "base/posix/eintr_wrapper.h"
#endif  // BUILDFLAG(IS_POSIX)

namespace crashpad {

#if BUILDFLAG(IS_POSIX)
// Ensure type compatibility between WritableIoVec and iovec.
static_assert;
static_assert;
static_assert;
#endif  // BUILDFLAG(IS_POSIX)

WeakFileHandleFileWriter::WeakFileHandleFileWriter(FileHandle file_handle)
    :{}

WeakFileHandleFileWriter::~WeakFileHandleFileWriter() {}

bool WeakFileHandleFileWriter::Write(const void* data, size_t size) {}

bool WeakFileHandleFileWriter::WriteIoVec(std::vector<WritableIoVec>* iovecs) {}

FileOffset WeakFileHandleFileWriter::Seek(FileOffset offset, int whence) {}

FileWriter::FileWriter()
    :{}

FileWriter::~FileWriter() {}

bool FileWriter::Open(const base::FilePath& path,
                      FileWriteMode write_mode,
                      FilePermissions permissions) {}

#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
bool FileWriter::OpenMemfd(const base::FilePath& path) {}

int FileWriter::fd() {}
#endif

void FileWriter::Close() {}

bool FileWriter::Write(const void* data, size_t size) {}

bool FileWriter::WriteIoVec(std::vector<WritableIoVec>* iovecs) {}

FileOffset FileWriter::Seek(FileOffset offset, int whence) {}

}  // namespace crashpad