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

Unified Diff: test/mac/mach_multiprocess.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 | « no previous file | test/scoped_temp_dir_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mac/mach_multiprocess.cc
diff --git a/test/mac/mach_multiprocess.cc b/test/mac/mach_multiprocess.cc
index 0458ef3c85a4a2ccd98adbfd9a367a958c3497b0..641eeba0f6c36ac3476103603952144c3c8d8b51 100644
--- a/test/mac/mach_multiprocess.cc
+++ b/test/mac/mach_multiprocess.cc
@@ -23,7 +23,6 @@
#include "base/logging.h"
#include "base/mac/scoped_mach_port.h"
#include "base/memory/scoped_ptr.h"
-#include "base/rand_util.h"
#include "gtest/gtest.h"
#include "test/errors.h"
#include "test/mac/mach_errors.h"
@@ -31,6 +30,7 @@
#include "util/mach/mach_extensions.h"
#include "util/mach/mach_message.h"
#include "util/misc/implicit_cast.h"
+#include "util/misc/random_string.h"
#include "util/misc/scoped_forbid_return.h"
namespace {
@@ -93,9 +93,7 @@ void MachMultiprocess::PreFork() {
// forking, so that it’s guaranteed to be there when the child attempts to
// look it up.
info_->service_name = "org.chromium.crashpad.test.mach_multiprocess.";
- for (int index = 0; index < 16; ++index) {
- info_->service_name.append(1, base::RandInt('A', 'Z'));
- }
+ info_->service_name.append(RandomString());
info_->local_port = BootstrapCheckIn(info_->service_name);
ASSERT_TRUE(info_->local_port.is_valid());
« no previous file with comments | « no previous file | test/scoped_temp_dir_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698