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

Unified Diff: chrome/common/libxml_utils.cc

Issue 2929: Some initial work on compiling chrome/common/ on Linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « chrome/common/json_value_serializer.cc ('k') | chrome/common/pref_member.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/libxml_utils.cc
===================================================================
--- chrome/common/libxml_utils.cc (revision 2299)
+++ chrome/common/libxml_utils.cc (working copy)
@@ -3,7 +3,10 @@
// found in the LICENSE file.
#include "chrome/common/libxml_utils.h"
+
+#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/string_util.h"
#include "libxml/xmlreader.h"
@@ -17,8 +20,8 @@
XmlReader::XmlReader()
: reader_(NULL),
-#pragma warning(suppress: 4355) // Okay to pass "this" here.
- error_func_(this, &XmlReader::GenericErrorCallback) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ error_func_(this, &XmlReader::GenericErrorCallback)) {
}
XmlReader::~XmlReader() {
@@ -30,11 +33,9 @@
const char* msg, ...) {
va_list args;
va_start(args, msg);
- char buffer[1 << 9];
- vsnprintf_s(buffer, arraysize(buffer), _TRUNCATE, msg, args);
XmlReader* reader = static_cast<XmlReader*>(context);
- reader->errors_.append(buffer);
+ reader->errors_.append(StringPrintf(msg, args));
}
bool XmlReader::Load(const std::string& input) {
« no previous file with comments | « chrome/common/json_value_serializer.cc ('k') | chrome/common/pref_member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698