OLD | NEW |
1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved. | 1 // Copyright (c) 2011 The LevelDB 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. See the AUTHORS file for names of contributors. | 3 // found in the LICENSE file. See the AUTHORS file for names of contributors. |
4 | 4 |
5 #include <errno.h> | 5 #include <errno.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 | 10 |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 if (!::base::DeleteFile(CreateFilePath(name), false)) { | 856 if (!::base::DeleteFile(CreateFilePath(name), false)) { |
857 result = MakeIOError(name, "Could not delete directory.", kDeleteDir); | 857 result = MakeIOError(name, "Could not delete directory.", kDeleteDir); |
858 RecordErrorAt(kDeleteDir); | 858 RecordErrorAt(kDeleteDir); |
859 } | 859 } |
860 return result; | 860 return result; |
861 } | 861 } |
862 | 862 |
863 Status ChromiumEnv::GetFileSize(const std::string& fname, uint64_t* size) { | 863 Status ChromiumEnv::GetFileSize(const std::string& fname, uint64_t* size) { |
864 Status s; | 864 Status s; |
865 int64_t signed_size; | 865 int64_t signed_size; |
866 if (!::file_util::GetFileSize(CreateFilePath(fname), &signed_size)) { | 866 if (!::base::GetFileSize(CreateFilePath(fname), &signed_size)) { |
867 *size = 0; | 867 *size = 0; |
868 s = MakeIOError(fname, "Could not determine file size.", kGetFileSize); | 868 s = MakeIOError(fname, "Could not determine file size.", kGetFileSize); |
869 RecordErrorAt(kGetFileSize); | 869 RecordErrorAt(kGetFileSize); |
870 } else { | 870 } else { |
871 *size = static_cast<uint64_t>(signed_size); | 871 *size = static_cast<uint64_t>(signed_size); |
872 } | 872 } |
873 return s; | 873 return s; |
874 } | 874 } |
875 | 875 |
876 Status ChromiumEnv::RenameFile(const std::string& src, const std::string& dst) { | 876 Status ChromiumEnv::RenameFile(const std::string& src, const std::string& dst) { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 Env* IDBEnv() { | 1207 Env* IDBEnv() { |
1208 return leveldb_env::idb_env.Pointer(); | 1208 return leveldb_env::idb_env.Pointer(); |
1209 } | 1209 } |
1210 | 1210 |
1211 Env* Env::Default() { | 1211 Env* Env::Default() { |
1212 return leveldb_env::default_env.Pointer(); | 1212 return leveldb_env::default_env.Pointer(); |
1213 } | 1213 } |
1214 | 1214 |
1215 } // namespace leveldb | 1215 } // namespace leveldb |
1216 | 1216 |
OLD | NEW |