diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 20:34:59 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 20:34:59 +0000 |
commit | 3469e7e544aeea3a5cee8aee9a8891a29c61a17d (patch) | |
tree | 4d9d1056f06f90f724ba702e94aa2b4d47da7fa6 /base/rand_util_win.cc | |
parent | 94e9666e60bf1d5e3559bfe216845a2cb054b204 (diff) | |
download | chromium_src-3469e7e544aeea3a5cee8aee9a8891a29c61a17d.zip chromium_src-3469e7e544aeea3a5cee8aee9a8891a29c61a17d.tar.gz chromium_src-3469e7e544aeea3a5cee8aee9a8891a29c61a17d.tar.bz2 |
Moving GUID generation from base to chrome/browser/guid*
Moves GUID generation into chrome/browser/guid*. GUID generation is used only within chrome/browser. So am moving it there.
BUG=58813
TEST=GUIDTest.GUIDGeneratesAllZeroes, GUIDTest.GUIDGeneratesCorrectly, GUIDTest.GUIDCorrectlyFormatted, MetricsServiceTest.ClientIdCorrectlyFormatted
Review URL: http://codereview.chromium.org/3800003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/rand_util_win.cc')
-rw-r--r-- | base/rand_util_win.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/base/rand_util_win.cc b/base/rand_util_win.cc index 5437177..ec0411e 100644 --- a/base/rand_util_win.cc +++ b/base/rand_util_win.cc @@ -6,13 +6,8 @@ #include <stdlib.h> -#include <objbase.h> -#include <windows.h> - #include "base/basictypes.h" #include "base/logging.h" -#include "base/string_util.h" -#include "base/utf_string_conversions.h" namespace { @@ -32,19 +27,4 @@ uint64 RandUint64() { return (static_cast<uint64>(first_half) << 32) + second_half; } -std::string GenerateGUID() { - const int kGUIDSize = 39; - - GUID guid; - HRESULT guid_result = CoCreateGuid(&guid); - DCHECK(SUCCEEDED(guid_result)); - - std::wstring guid_string; - int result = StringFromGUID2(guid, - WriteInto(&guid_string, kGUIDSize), kGUIDSize); - DCHECK(result == kGUIDSize); - - return WideToUTF8(guid_string.substr(1, guid_string.length() - 2)); -} - } // namespace base |