1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_DISK_CACHE_FLASH_STORAGE_H_
6 #define NET_DISK_CACHE_FLASH_STORAGE_H_
8 #include "base/basictypes.h"
9 #include "base/platform_file.h"
10 #include "net/base/net_export.h"
12 namespace disk_cache {
14 class NET_EXPORT_PRIVATE Storage {
16 Storage(const base::FilePath& path, int32 size);
20 int32 size() const { return size_; }
22 bool Read(void* buffer, int32 size, int32 offset);
23 bool Write(const void* buffer, int32 size, int32 offset);
28 base::PlatformFile file_;
30 DISALLOW_COPY_AND_ASSIGN(Storage);
33 } // namespace disk_cache
35 #endif // NET_DISK_CACHE_FLASH_STORAGE_H_