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

Side by Side Diff: third_party/leveldatabase/env_chromium.cc

Issue 99923002: Move temp file functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 } 976 }
977 bool removed = locks_.Remove(my_lock->name_); 977 bool removed = locks_.Remove(my_lock->name_);
978 DCHECK(removed); 978 DCHECK(removed);
979 delete my_lock; 979 delete my_lock;
980 return result; 980 return result;
981 } 981 }
982 982
983 Status ChromiumEnv::GetTestDirectory(std::string* path) { 983 Status ChromiumEnv::GetTestDirectory(std::string* path) {
984 mu_.Acquire(); 984 mu_.Acquire();
985 if (test_directory_.empty()) { 985 if (test_directory_.empty()) {
986 if (!::file_util::CreateNewTempDirectory(kLevelDBTestDirectoryPrefix, 986 if (!base::CreateNewTempDirectory(kLevelDBTestDirectoryPrefix,
987 &test_directory_)) { 987 &test_directory_)) {
988 mu_.Release(); 988 mu_.Release();
989 RecordErrorAt(kGetTestDirectory); 989 RecordErrorAt(kGetTestDirectory);
990 return MakeIOError( 990 return MakeIOError(
991 "Could not create temp directory.", "", kGetTestDirectory); 991 "Could not create temp directory.", "", kGetTestDirectory);
992 } 992 }
993 } 993 }
994 *path = FilePathToString(test_directory_); 994 *path = FilePathToString(test_directory_);
995 mu_.Release(); 995 mu_.Release();
996 return Status::OK(); 996 return Status::OK();
997 } 997 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « remoting/host/pairing_registry_delegate_linux_unittest.cc ('k') | webkit/browser/database/database_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698