Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: net/disk_cache/flash/storage.h

Issue 125643002: Convert most of base and net to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use error_details() Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DISK_CACHE_FLASH_STORAGE_H_ 5 #ifndef NET_DISK_CACHE_FLASH_STORAGE_H_
6 #define NET_DISK_CACHE_FLASH_STORAGE_H_ 6 #define NET_DISK_CACHE_FLASH_STORAGE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/platform_file.h" 9 #include "base/files/file.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
11 11
12 namespace disk_cache { 12 namespace disk_cache {
13 13
14 class NET_EXPORT_PRIVATE Storage { 14 class NET_EXPORT_PRIVATE Storage {
15 public: 15 public:
16 Storage(const base::FilePath& path, int32 size); 16 Storage(const base::FilePath& path, int32 size);
17 bool Init(); 17 bool Init();
18 ~Storage(); 18 ~Storage();
19 19
20 int32 size() const { return size_; } 20 int32 size() const { return size_; }
21 21
22 bool Read(void* buffer, int32 size, int32 offset); 22 bool Read(void* buffer, int32 size, int32 offset);
23 bool Write(const void* buffer, int32 size, int32 offset); 23 bool Write(const void* buffer, int32 size, int32 offset);
24 24
25 private: 25 private:
26 base::FilePath path_; 26 base::FilePath path_;
27 int32 size_; 27 int32 size_;
28 base::PlatformFile file_; 28 base::File file_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(Storage); 30 DISALLOW_COPY_AND_ASSIGN(Storage);
31 }; 31 };
32 32
33 } // namespace disk_cache 33 } // namespace disk_cache
34 34
35 #endif // NET_DISK_CACHE_FLASH_STORAGE_H_ 35 #endif // NET_DISK_CACHE_FLASH_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698