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

Unified Diff: test/scoped_temp_dir_win.cc

Issue 1451793002: Add RandomString() and its test, and use it everywhere it makes sense (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix tpyo Created 5 years, 1 month 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 | « test/mac/mach_multiprocess.cc ('k') | util/mac/service_management_test.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/scoped_temp_dir_win.cc
diff --git a/test/scoped_temp_dir_win.cc b/test/scoped_temp_dir_win.cc
index 14674d9b139321815474edf6660f32175d8b8045..cc4820d69be9acf36f3500c4f7d088776754d9f8 100644
--- a/test/scoped_temp_dir_win.cc
+++ b/test/scoped_temp_dir_win.cc
@@ -17,10 +17,10 @@
#include <windows.h>
#include "base/logging.h"
-#include "base/rand_util.h"
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "util/misc/random_string.h"
#include "gtest/gtest.h"
namespace crashpad {
@@ -34,7 +34,7 @@ base::FilePath GenerateCandidateName() {
PCHECK(path_len != 0) << "GetTempPath";
base::FilePath system_temp_dir(temp_path);
base::string16 new_dir_name = base::UTF8ToUTF16(base::StringPrintf(
- "crashpad.test.%d.%I64x", GetCurrentProcessId(), base::RandUint64()));
+ "crashpad.test.%d.%s", GetCurrentProcessId(), RandomString().c_str()));
return system_temp_dir.Append(new_dir_name);
}
« no previous file with comments | « test/mac/mach_multiprocess.cc ('k') | util/mac/service_management_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698