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

Unified Diff: third_party/crashpad/crashpad/util/misc/paths.h

Issue 2804713002: Update Crashpad to b4095401639ebe2ad33169e5c1d994065cbff1b8 (Closed)
Patch Set: Created 3 years, 8 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: third_party/crashpad/crashpad/util/misc/paths.h
diff --git a/third_party/crashpad/crashpad/test/hex_string_test.cc b/third_party/crashpad/crashpad/util/misc/paths.h
similarity index 53%
copy from third_party/crashpad/crashpad/test/hex_string_test.cc
copy to third_party/crashpad/crashpad/util/misc/paths.h
index 62b45c1260ed1d17223b312c4be51ab10cf791f1..30bbec509848dc629c8817367c88dfe5b5cf3906 100644
--- a/third_party/crashpad/crashpad/test/hex_string_test.cc
+++ b/third_party/crashpad/crashpad/util/misc/paths.h
@@ -12,23 +12,29 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "test/hex_string.h"
+#ifndef CRASHPAD_UTIL_PATHS_H_
+#define CRASHPAD_UTIL_PATHS_H_
+#include "base/files/file_path.h"
#include "base/macros.h"
-#include "gtest/gtest.h"
namespace crashpad {
-namespace test {
-namespace {
-TEST(HexString, HexString) {
- EXPECT_EQ("", BytesToHexString(nullptr, 0));
+//! \brief Functions to obtain paths.
+class Paths {
+ public:
+ //! \brief Obtains the pathname of the currently-running executable.
+ //!
+ //! \param[out] path The pathname of the currently-running executable.
+ //!
+ //! \return `true` on success. `false` on failure, with a message logged.
+ //!
+ //! \note In test code, use test::TestPaths::Executable() instead.
+ static bool Executable(base::FilePath* path);
- const char kBytes[] = "Abc123xyz \x0a\x7f\xf0\x9f\x92\xa9_";
- EXPECT_EQ("41626331323378797a200a7ff09f92a95f00",
- BytesToHexString(kBytes, arraysize(kBytes)));
-}
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Paths);
+};
-} // namespace
-} // namespace test
} // namespace crashpad
+
+#endif // CRASHPAD_UTIL_TEST_PATHS_H_
« no previous file with comments | « third_party/crashpad/crashpad/util/mach/task_memory_test.cc ('k') | third_party/crashpad/crashpad/util/misc/paths_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698