| 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 false); | 831 false); |
| 832 } | 832 } |
| 833 return result; | 833 return result; |
| 834 } | 834 } |
| 835 | 835 |
| 836 Status ChromiumEnv::CreateDir(const std::string& name) { | 836 Status ChromiumEnv::CreateDir(const std::string& name) { |
| 837 Status result; | 837 Status result; |
| 838 base::PlatformFileError error = base::PLATFORM_FILE_OK; | 838 base::PlatformFileError error = base::PLATFORM_FILE_OK; |
| 839 Retrier retrier(kCreateDir, this); | 839 Retrier retrier(kCreateDir, this); |
| 840 do { | 840 do { |
| 841 if (::file_util::CreateDirectoryAndGetError(CreateFilePath(name), &error)) | 841 if (base::CreateDirectoryAndGetError(CreateFilePath(name), &error)) |
| 842 return result; | 842 return result; |
| 843 } while (retrier.ShouldKeepTrying(error)); | 843 } while (retrier.ShouldKeepTrying(error)); |
| 844 result = MakeIOError(name, "Could not create directory.", kCreateDir, error); | 844 result = MakeIOError(name, "Could not create directory.", kCreateDir, error); |
| 845 RecordOSError(kCreateDir, error); | 845 RecordOSError(kCreateDir, error); |
| 846 return result; | 846 return result; |
| 847 } | 847 } |
| 848 | 848 |
| 849 Status ChromiumEnv::DeleteDir(const std::string& name) { | 849 Status ChromiumEnv::DeleteDir(const std::string& name) { |
| 850 Status result; | 850 Status result; |
| 851 // TODO(jorlow): Should we assert this is a directory? | 851 // TODO(jorlow): Should we assert this is a directory? |
| (...skipping 351 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 |