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

Unified Diff: minidump/minidump_string_writer.h

Issue 656173003: Add MinidumpSimpleStringDictionaryWriter and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 2 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 | « minidump/minidump_simple_string_dictionary_writer_test.cc ('k') | minidump/minidump_string_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_string_writer.h
diff --git a/minidump/minidump_string_writer.h b/minidump/minidump_string_writer.h
index 237d0d363940067e3d68a63317653b67c60ffcff..f6c769612c5054da07197f4700998d39fcdd41ba 100644
--- a/minidump/minidump_string_writer.h
+++ b/minidump/minidump_string_writer.h
@@ -69,6 +69,11 @@ class MinidumpStringWriter : public MinidumpWritable {
//! \note Valid in #kStateMutable.
void set_string(const StringType& string) { string_.assign(string); }
+ //! \brief Retrieves the string to be written.
+ //!
+ //! \note Valid in any state.
+ const StringType& string() const { return string_; }
+
private:
MinidumpStringType string_base_;
StringType string_;
@@ -113,6 +118,11 @@ class MinidumpUTF8StringWriter final
//! \note Valid in #kStateMutable.
void SetUTF8(const std::string& string_utf8) { set_string(string_utf8); }
+ //! \brief Retrieves the string to be written.
+ //!
+ //! \note Valid in any state.
+ const std::string& UTF8() const { return string(); }
+
private:
DISALLOW_COPY_AND_ASSIGN(MinidumpUTF8StringWriter);
};
« no previous file with comments | « minidump/minidump_simple_string_dictionary_writer_test.cc ('k') | minidump/minidump_string_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698