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 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 if (!::base::DeleteFile(CreateFilePath(name), false)) { | 852 if (!::base::DeleteFile(CreateFilePath(name), false)) { |
853 result = MakeIOError(name, "Could not delete directory.", kDeleteDir); | 853 result = MakeIOError(name, "Could not delete directory.", kDeleteDir); |
854 RecordErrorAt(kDeleteDir); | 854 RecordErrorAt(kDeleteDir); |
855 } | 855 } |
856 return result; | 856 return result; |
857 } | 857 } |
858 | 858 |
859 Status ChromiumEnv::GetFileSize(const std::string& fname, uint64_t* size) { | 859 Status ChromiumEnv::GetFileSize(const std::string& fname, uint64_t* size) { |
860 Status s; | 860 Status s; |
861 int64_t signed_size; | 861 int64_t signed_size; |
862 if (!::file_util::GetFileSize(CreateFilePath(fname), &signed_size)) { | 862 if (!::base::GetFileSize(CreateFilePath(fname), &signed_size)) { |
863 *size = 0; | 863 *size = 0; |
864 s = MakeIOError(fname, "Could not determine file size.", kGetFileSize); | 864 s = MakeIOError(fname, "Could not determine file size.", kGetFileSize); |
865 RecordErrorAt(kGetFileSize); | 865 RecordErrorAt(kGetFileSize); |
866 } else { | 866 } else { |
867 *size = static_cast<uint64_t>(signed_size); | 867 *size = static_cast<uint64_t>(signed_size); |
868 } | 868 } |
869 return s; | 869 return s; |
870 } | 870 } |
871 | 871 |
872 Status ChromiumEnv::RenameFile(const std::string& src, const std::string& dst) { | 872 Status ChromiumEnv::RenameFile(const std::string& src, const std::string& dst) { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 Env* IDBEnv() { | 1203 Env* IDBEnv() { |
1204 return leveldb_env::idb_env.Pointer(); | 1204 return leveldb_env::idb_env.Pointer(); |
1205 } | 1205 } |
1206 | 1206 |
1207 Env* Env::Default() { | 1207 Env* Env::Default() { |
1208 return leveldb_env::default_env.Pointer(); | 1208 return leveldb_env::default_env.Pointer(); |
1209 } | 1209 } |
1210 | 1210 |
1211 } // namespace leveldb | 1211 } // namespace leveldb |
1212 | 1212 |
OLD | NEW |