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

Unified Diff: ppapi/native_client/src/untrusted/nacl_ppapi_util/string_buffer.h

Issue 10914053: Relocating files in the nacl repo that belong in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 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
Index: ppapi/native_client/src/untrusted/nacl_ppapi_util/string_buffer.h
diff --git a/ppapi/native_client/src/untrusted/nacl_ppapi_util/string_buffer.h b/ppapi/native_client/src/untrusted/nacl_ppapi_util/string_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..028e33030d4c887d1220a029da5a5e1740b5c0ed
--- /dev/null
+++ b/ppapi/native_client/src/untrusted/nacl_ppapi_util/string_buffer.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef NATIVE_CLIENT_TESTS_MANIFEST_FILE_STRING_BUFFER_H_
+#define NATIVE_CLIENT_TESTS_MANIFEST_FILE_STRING_BUFFER_H_
+
+#include <string>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+
+namespace nacl {
+
+class StringBuffer {
+ public:
+ StringBuffer();
+ ~StringBuffer();
+ void DiscardOutput();
+ void Printf(char const *fmt, ...) __attribute__((format(printf, 2, 3)));
+ std::string ToString() {
+ return std::string(buffer_, insert_);
+ }
+
+ private:
+ size_t nbytes_;
+ size_t insert_;
+ char *buffer_;
+};
+
+} // namespace nacl
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698