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

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

Issue 100573002: Move directory creation 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
« no previous file with comments | « skia/ext/vector_canvas_unittest.cc ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 | « skia/ext/vector_canvas_unittest.cc ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698