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

Side by Side Diff: minidump/minidump_string_writer.h

Issue 1419623003: Write MINIDUMP_HANDLE_DATA_STREAM to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 public: 92 public:
93 MinidumpUTF16StringWriter() : MinidumpStringWriter() {} 93 MinidumpUTF16StringWriter() : MinidumpStringWriter() {}
94 ~MinidumpUTF16StringWriter() override; 94 ~MinidumpUTF16StringWriter() override;
95 95
96 //! \brief Converts a UTF-8 string to UTF-16 and sets it as the string to be 96 //! \brief Converts a UTF-8 string to UTF-16 and sets it as the string to be
97 //! written. 97 //! written.
98 //! 98 //!
99 //! \note Valid in #kStateMutable. 99 //! \note Valid in #kStateMutable.
100 void SetUTF8(const std::string& string_utf8); 100 void SetUTF8(const std::string& string_utf8);
101 101
102 //! \brief Sets the given UTF-16 string as the string to be written.
103 //!
104 //! \note Valid in #kStateMutable.
105 void SetUTF16(const base::string16& string_utf16) {
106 set_string(string_utf16);
107 }
108
102 private: 109 private:
103 DISALLOW_COPY_AND_ASSIGN(MinidumpUTF16StringWriter); 110 DISALLOW_COPY_AND_ASSIGN(MinidumpUTF16StringWriter);
104 }; 111 };
105 112
106 //! \brief Writes a variable-length UTF-8-encoded MinidumpUTF8String to a 113 //! \brief Writes a variable-length UTF-8-encoded MinidumpUTF8String to a
107 //! minidump file. 114 //! minidump file.
108 //! 115 //!
109 //! MinidumpUTF8StringWriter objects should not be instantiated directly outside 116 //! MinidumpUTF8StringWriter objects should not be instantiated directly outside
110 //! of the MinidumpWritable family of classes. 117 //! of the MinidumpWritable family of classes.
111 class MinidumpUTF8StringWriter final 118 class MinidumpUTF8StringWriter final
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } // namespace internal 181 } // namespace internal
175 182
176 using MinidumpUTF16StringListWriter = internal::MinidumpStringListWriter< 183 using MinidumpUTF16StringListWriter = internal::MinidumpStringListWriter<
177 internal::MinidumpUTF16StringWriter>; 184 internal::MinidumpUTF16StringWriter>;
178 using MinidumpUTF8StringListWriter = internal::MinidumpStringListWriter< 185 using MinidumpUTF8StringListWriter = internal::MinidumpStringListWriter<
179 internal::MinidumpUTF8StringWriter>; 186 internal::MinidumpUTF8StringWriter>;
180 187
181 } // namespace crashpad 188 } // namespace crashpad
182 189
183 #endif // CRASHPAD_MINIDUMP_MINIDUMP_STRING_WRITER_H_ 190 #endif // CRASHPAD_MINIDUMP_MINIDUMP_STRING_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698