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

Unified Diff: util/win/process_info_test.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 | « util/win/exception_handler_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/process_info_test.cc
diff --git a/util/win/process_info_test.cc b/util/win/process_info_test.cc
index 52d8c7879cf549d241afe26037311978e8b873be..e5bde2f6ae795fc036f5f6e76916daf4c88d1e7c 100644
--- a/util/win/process_info_test.cc
+++ b/util/win/process_info_test.cc
@@ -20,7 +20,6 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
-#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
@@ -30,6 +29,7 @@
#include "test/paths.h"
#include "test/win/child_launcher.h"
#include "util/file/file_io.h"
+#include "util/misc/random_string.h"
#include "util/misc/uuid.h"
#include "util/win/command_line.h"
#include "util/win/get_function.h"
@@ -559,9 +559,9 @@ TEST(ProcessInfo, Handles) {
ASSERT_TRUE(scoped_key.is_valid());
std::wstring mapping_name =
- base::UTF8ToUTF16(base::StringPrintf("Local\\test_mapping_%d_%I64x",
+ base::UTF8ToUTF16(base::StringPrintf("Local\\test_mapping_%d_%s",
GetCurrentProcessId(),
- base::RandUint64()));
+ RandomString().c_str()));
ScopedKernelHANDLE mapping(CreateFileMapping(INVALID_HANDLE_VALUE,
nullptr,
PAGE_READWRITE,
« no previous file with comments | « util/win/exception_handler_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698