chromium/storage/browser/file_system/async_file_util_adapter.h

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

#ifndef STORAGE_BROWSER_FILE_SYSTEM_ASYNC_FILE_UTIL_ADAPTER_H_
#define STORAGE_BROWSER_FILE_SYSTEM_ASYNC_FILE_UTIL_ADAPTER_H_

#include <stdint.h>

#include <memory>

#include "base/component_export.h"
#include "base/memory/ptr_util.h"
#include "storage/browser/file_system/async_file_util.h"

namespace storage {

class FileSystemFileUtil;

// An adapter class for FileSystemFileUtil classes to provide asynchronous
// interface.
//
// A filesystem can do either:
// - implement a synchronous version of FileUtil by extending
//   FileSystemFileUtil and atach it to this adapter, or
// - directly implement AsyncFileUtil.
//
// This instance (as thus this->sync_file_util_) is guaranteed to be alive
// as far as FileSystemOperationContext given to each operation is kept alive.
class COMPONENT_EXPORT(STORAGE_BROWSER) AsyncFileUtilAdapter
    : public AsyncFileUtil {};

}  // namespace storage

#endif  // STORAGE_BROWSER_FILE_SYSTEM_ASYNC_FILE_UTIL_ADAPTER_H_