OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 //! returns the string data as a `string16`. | 71 //! returns the string data as a `string16`. |
72 //! | 72 //! |
73 //! \param[in] file_contents The contents of the minidump file. | 73 //! \param[in] file_contents The contents of the minidump file. |
74 //! \param[in] rva The offset within the minidump file of the desired | 74 //! \param[in] rva The offset within the minidump file of the desired |
75 //! MINIDUMP_STRING. | 75 //! MINIDUMP_STRING. |
76 //! | 76 //! |
77 //! \return On success, the string read from \a file_writer at offset \a rva. On | 77 //! \return On success, the string read from \a file_writer at offset \a rva. On |
78 //! failure, raises a gtest assertion and returns an empty string. | 78 //! failure, raises a gtest assertion and returns an empty string. |
79 //! | 79 //! |
80 //! \sa MinidumpUTF8StringAtRVAAsString() | 80 //! \sa MinidumpUTF8StringAtRVAAsString() |
81 string16 MinidumpStringAtRVAAsString(const std::string& file_contents, RVA rva); | 81 base::string16 MinidumpStringAtRVAAsString(const std::string& file_contents, |
| 82 RVA rva); |
82 | 83 |
83 //! \brief Returns the contents of a MinidumpUTF8String as a `std::string`. | 84 //! \brief Returns the contents of a MinidumpUTF8String as a `std::string`. |
84 //! | 85 //! |
85 //! This function uses MinidumpUTF8StringAtRVA() to obtain a MinidumpUTF8String, | 86 //! This function uses MinidumpUTF8StringAtRVA() to obtain a MinidumpUTF8String, |
86 //! and returns the string data as a `std::string`. | 87 //! and returns the string data as a `std::string`. |
87 //! | 88 //! |
88 //! \param[in] file_contents The contents of the minidump file. | 89 //! \param[in] file_contents The contents of the minidump file. |
89 //! \param[in] rva The offset within the minidump file of the desired | 90 //! \param[in] rva The offset within the minidump file of the desired |
90 //! MinidumpUTF8String. | 91 //! MinidumpUTF8String. |
91 //! | 92 //! |
92 //! \return On success, the string read from \a file_writer at offset \a rva. On | 93 //! \return On success, the string read from \a file_writer at offset \a rva. On |
93 //! failure, raises a gtest assertion and returns an empty string. | 94 //! failure, raises a gtest assertion and returns an empty string. |
94 //! | 95 //! |
95 //! \sa MinidumpStringAtRVAAsString() | 96 //! \sa MinidumpStringAtRVAAsString() |
96 std::string MinidumpUTF8StringAtRVAAsString(const std::string& file_contents, | 97 std::string MinidumpUTF8StringAtRVAAsString(const std::string& file_contents, |
97 RVA rva); | 98 RVA rva); |
98 | 99 |
99 } // namespace test | 100 } // namespace test |
100 } // namespace crashpad | 101 } // namespace crashpad |
101 | 102 |
102 #endif // CRASHPAD_MINIDUMP_TEST_MINIDUMP_STRING_WRITER_TEST_UTIL_H_ | 103 #endif // CRASHPAD_MINIDUMP_TEST_MINIDUMP_STRING_WRITER_TEST_UTIL_H_ |
OLD | NEW |