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

Issue 3800003: Moving GUID generation from base to chrome/browser/guid* (Closed)

Created:
10 years, 2 months ago by dhollowa
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, pam+watch_chromium.org, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=62639

Patch Set 1 #

Total comments: 6

Patch Set 2 : Utility function to header. #

Total comments: 4

Patch Set 3 : Error handling. #

Total comments: 2

Patch Set 4 : Additional comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -91 lines) Patch
M base/rand_util.h View 2 chunks +0 lines, -5 lines 0 comments Download
M base/rand_util_posix.cc View 2 chunks +0 lines, -17 lines 0 comments Download
M base/rand_util_unittest.cc View 1 chunk +0 lines, -47 lines 0 comments Download
M base/rand_util_win.cc View 2 chunks +0 lines, -20 lines 0 comments Download
A chrome/browser/guid.h View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/guid_posix.cc View 1 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/guid_unittest.cc View 1 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/guid_win.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
dhollowa
10 years, 2 months ago (2010-10-14 04:33:08 UTC) #1
brettw
LGTM, thanks a lot for following up!
10 years, 2 months ago (2010-10-14 04:54:41 UTC) #2
Paweł Hajdan Jr.
Drive-by with test comments. http://codereview.chromium.org/3800003/diff/1/8 File chrome/browser/guid_unittest.cc (right): http://codereview.chromium.org/3800003/diff/1/8#newcode14 chrome/browser/guid_unittest.cc:14: extern std::string RandomBytesToGUIDString(const uint64 bytes[2]); ...
10 years, 2 months ago (2010-10-14 07:05:57 UTC) #3
Mark Mentovai
LGTM
10 years, 2 months ago (2010-10-14 11:09:27 UTC) #4
dhollowa
http://codereview.chromium.org/3800003/diff/1/8 File chrome/browser/guid_unittest.cc (right): http://codereview.chromium.org/3800003/diff/1/8#newcode14 chrome/browser/guid_unittest.cc:14: extern std::string RandomBytesToGUIDString(const uint64 bytes[2]); On 2010/10/14 07:05:57, Paweł ...
10 years, 2 months ago (2010-10-14 14:37:27 UTC) #5
brettw
http://codereview.chromium.org/3800003/diff/1/8 File chrome/browser/guid_unittest.cc (right): http://codereview.chromium.org/3800003/diff/1/8#newcode14 chrome/browser/guid_unittest.cc:14: extern std::string RandomBytesToGUIDString(const uint64 bytes[2]); I think it's fine ...
10 years, 2 months ago (2010-10-14 15:05:43 UTC) #6
dhollowa
http://codereview.chromium.org/3800003/diff/1/8 File chrome/browser/guid_unittest.cc (right): http://codereview.chromium.org/3800003/diff/1/8#newcode14 chrome/browser/guid_unittest.cc:14: extern std::string RandomBytesToGUIDString(const uint64 bytes[2]); On 2010/10/14 15:05:43, brettw ...
10 years, 2 months ago (2010-10-14 16:15:06 UTC) #7
brettw
LGTM http://codereview.chromium.org/3800003/diff/10001/11005 File chrome/browser/guid.h (right): http://codereview.chromium.org/3800003/diff/10001/11005#newcode18 chrome/browser/guid.h:18: #if defined(OS_POSIX) You'll need to include "build/build_config.h" in ...
10 years, 2 months ago (2010-10-14 16:24:15 UTC) #8
dhollowa
http://codereview.chromium.org/3800003/diff/10001/11005 File chrome/browser/guid.h (right): http://codereview.chromium.org/3800003/diff/10001/11005#newcode18 chrome/browser/guid.h:18: #if defined(OS_POSIX) On 2010/10/14 16:24:15, brettw wrote: > You'll ...
10 years, 2 months ago (2010-10-14 16:48:03 UTC) #9
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM. http://codereview.chromium.org/3800003/diff/8002/25005 File chrome/browser/guid.h (right): http://codereview.chromium.org/3800003/diff/8002/25005#newcode20 chrome/browser/guid.h:20: #if defined(OS_POSIX) ...
10 years, 2 months ago (2010-10-14 17:21:02 UTC) #10
dhollowa
10 years, 2 months ago (2010-10-14 17:58:24 UTC) #11
http://codereview.chromium.org/3800003/diff/8002/25005
File chrome/browser/guid.h (right):

http://codereview.chromium.org/3800003/diff/8002/25005#newcode20
chrome/browser/guid.h:20: #if defined(OS_POSIX)
On 2010/10/14 17:21:02, Paweł Hajdan Jr. wrote:
> nit: I think you could also add && defined(UNIT_TEST). This way the function
> would only be exposed for the test code. Up to you.

This is tantalizing, but gets ugly because the declaration needs to exist for
non-unit test code as well.  I think the current way is cleaner.

Powered by Google App Engine
This is Rietveld 408576698