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

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 2364903003: Suppress definition of snprintf in port_chromium.h which conflicts with base::snprintf. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | third_party/leveldatabase/port/port_chromium.h » ('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 9cc6553d826e329c8dbe0750483ce6d6e1310145..63b1a8a6547f5a775e8d8b9e33357eefa2581f30 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -17,6 +17,7 @@
#include "base/metrics/histogram.h"
#include "base/process/process_metrics.h"
#include "base/stl_util.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
@@ -378,7 +379,7 @@ Status MakeIOError(Slice filename,
base::File::Error error) {
DCHECK_LT(error, 0);
char buf[512];
- snprintf(buf, sizeof(buf), "%s (ChromeMethodBFE: %d::%s::%d)",
+ base::snprintf(buf, sizeof(buf), "%s (ChromeMethodBFE: %d::%s::%d)",
message.c_str(), method, MethodIDToString(method), -error);
return Status::IOError(filename, buf);
}
@@ -387,7 +388,7 @@ Status MakeIOError(Slice filename,
const std::string& message,
MethodID method) {
char buf[512];
- snprintf(buf, sizeof(buf), "%s (ChromeMethodOnly: %d::%s)", message.c_str(),
+ base::snprintf(buf, sizeof(buf), "%s (ChromeMethodOnly: %d::%s)", message.c_str(),
method, MethodIDToString(method));
return Status::IOError(filename, buf);
}
@@ -689,7 +690,7 @@ Status ChromiumEnv::RenameFile(const std::string& src, const std::string& dst) {
DCHECK(error != base::File::FILE_OK);
RecordOSError(kRenameFile, error);
char buf[100];
- snprintf(buf,
+ base::snprintf(buf,
sizeof(buf),
"Could not rename file: %s",
FileErrorString(error));
« no previous file with comments | « no previous file | third_party/leveldatabase/port/port_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698