| Index: chrome/installer/setup/user_hive_visitor.cc
|
| diff --git a/chrome/installer/setup/user_hive_visitor.cc b/chrome/installer/setup/user_hive_visitor.cc
|
| index ca2d7fe9c1cedf6f71b3a214dbd9f71be1600813..e26f7c904fc67c3d5535eaff20aa0cc8bf4110e3 100644
|
| --- a/chrome/installer/setup/user_hive_visitor.cc
|
| +++ b/chrome/installer/setup/user_hive_visitor.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/installer/setup/user_hive_visitor.h"
|
|
|
| +#include <string>
|
| #include <utility>
|
|
|
| #include "base/bind.h"
|
| @@ -15,9 +16,10 @@
|
| #include "base/rand_util.h"
|
| #include "base/strings/string16.h"
|
| #include "base/strings/string_piece.h"
|
| +#include "base/strings/utf_string_conversions.h"
|
| #include "base/win/registry.h"
|
| #include "chrome/installer/setup/setup_util.h"
|
| -#include "chrome/installer/util/shell_util.h"
|
| +#include "components/base32/base32.h"
|
|
|
| namespace installer {
|
|
|
| @@ -49,9 +51,9 @@ class ScopedUserHive {
|
|
|
| ScopedUserHive::ScopedUserHive(const base::FilePath& hive_file) {
|
| // Generate a random name for the key at which the file will be loaded.
|
| - uint8_t buffer[10] = {};
|
| - base::RandBytes(&buffer[0], arraysize(buffer));
|
| - subkey_name_ = ShellUtil::ByteArrayToBase32(&buffer[0], arraysize(buffer));
|
| + std::string buffer = base::RandBytesAsString(10);
|
| + subkey_name_ = base::ASCIIToUTF16(
|
| + base32::Base32Encode(buffer, base32::Base32EncodePolicy::OMIT_PADDING));
|
| DCHECK_EQ(16U, subkey_name_.size());
|
|
|
| LONG result = ::RegLoadKey(HKEY_LOCAL_MACHINE, subkey_name_.c_str(),
|
|
|