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

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/policy_hack/policy_watcher_linux.cc ('k') | third_party/zlib/google/zip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 922c5d511d3ef9c158d6acc732b2cb4dfea44a03..3857be19499671e5a105f642608355bb79aa9be0 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -841,11 +841,15 @@ Status ChromiumEnv::DeleteFile(const std::string& fname) {
Status ChromiumEnv::CreateDir(const std::string& name) {
Status result;
+ // TODO(rvargas): convert this code to base::File::Error.
base::PlatformFileError error = base::PLATFORM_FILE_OK;
Retrier retrier(kCreateDir, this);
do {
- if (base::CreateDirectoryAndGetError(CreateFilePath(name), &error))
+ if (base::CreateDirectoryAndGetError(
+ CreateFilePath(name),
+ reinterpret_cast<base::File::Error*>(&error))) {
return result;
+ }
} while (retrier.ShouldKeepTrying(error));
result = MakeIOError(name, "Could not create directory.", kCreateDir, error);
RecordOSError(kCreateDir, error);
@@ -883,10 +887,13 @@ Status ChromiumEnv::RenameFile(const std::string& src, const std::string& dst) {
base::FilePath destination = CreateFilePath(dst);
Retrier retrier(kRenameFile, this);
+ // TODO(rvargas): convert this code to base::File::Error.
base::PlatformFileError error = base::PLATFORM_FILE_OK;
do {
- if (base::ReplaceFile(src_file_path, destination, &error))
+ if (base::ReplaceFile(src_file_path, destination,
+ reinterpret_cast<base::File::Error*>(&error))) {
return result;
+ }
} while (retrier.ShouldKeepTrying(error));
DCHECK(error != base::PLATFORM_FILE_OK);
« no previous file with comments | « remoting/host/policy_hack/policy_watcher_linux.cc ('k') | third_party/zlib/google/zip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698