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

Unified Diff: base/rand_util_win.cc

Issue 3800003: Moving GUID generation from base to chrome/browser/guid* (Closed)
Patch Set: Additional comment. Created 10 years, 2 months 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 | « base/rand_util_unittest.cc ('k') | chrome/browser/guid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/rand_util_win.cc
diff --git a/base/rand_util_win.cc b/base/rand_util_win.cc
index 5437177135ff9ba7376817ad21b421f2c30b38fe..ec0411efd3add4ba6be9d1ab57c53deb9c32cadf 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
« no previous file with comments | « base/rand_util_unittest.cc ('k') | chrome/browser/guid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698