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

Issue 10617002: Use a better registration suffix that will always be unique while respecting the MSDN rules. (Closed)

Created:
8 years, 6 months ago by gab
Modified:
8 years, 5 months ago
CC:
chromium-reviews, erikwright (departed), grt+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Use a better registration suffix that will always be unique while respecting the MSDN rules. The suffix will now be the base32 encoding of the md5 hash of the user's username. This is always unique and can be determined many times deterministically without I/O access (as opposed to other methods we considered). It respects all MSDN constraint for properties onto which it is appended. This replaces the prior-style username suffixes for new installs. Old-style suffixes (i.e. unsuffixed and username suffixed) will however be kept as is through future updates. Design doc: https://docs.google.com/a/chromium.org/document/d/1qmcV3uYBh3JwvXhYkI7asg0nN7KfVMWVOzND4p0jQ3E/edit BUG=133810, 133173 TEST= http://goo.gl/ZZ7gE installer_util_unittests.exe --gtest_filter=ShellUtilTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143782

Patch Set 1 #

Total comments: 18

Patch Set 2 : First algorithm + test #

Patch Set 3 : remove changes to base for previous sid method #

Patch Set 4 : new uber-cool algorithm #

Patch Set 5 : address gregs initial comments #

Total comments: 10

Patch Set 6 : addressed robert's comments #

Total comments: 1

Patch Set 7 : oops nit #

Total comments: 5

Patch Set 8 : last nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -44 lines) Patch
M chrome/installer/util/shell_util.h View 1 2 3 4 5 3 chunks +14 lines, -2 lines 0 comments Download
M chrome/installer/util/shell_util.cc View 1 2 3 4 5 6 7 12 chunks +172 lines, -35 lines 0 comments Download
M chrome/installer/util/shell_util_unittest.cc View 1 2 3 4 5 6 8 chunks +30 lines, -7 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
gab
IMPORTANT! (i.e. Release-blocker as you know...) I just finished this now, see some of my ...
8 years, 6 months ago (2012-06-21 05:55:41 UTC) #1
grt (UTC plus 2)
the SID encoding isn't quite right, since the SID struct contains a variable number of ...
8 years, 6 months ago (2012-06-21 13:39:58 UTC) #2
gab
As discussed, I'm changing the GetNewUserSpecificRegistrySuffix() call to use a base32 encoding of the md5 ...
8 years, 6 months ago (2012-06-21 21:12:40 UTC) #3
grt (UTC plus 2)
On 2012/06/21 21:12:40, gab wrote: > As discussed, I'm changing the GetNewUserSpecificRegistrySuffix() call to use ...
8 years, 6 months ago (2012-06-21 23:14:51 UTC) #4
grt (UTC plus 2)
On 2012/06/21 23:14:51, grt wrote: > I can't think of any reason not to simplify ...
8 years, 6 months ago (2012-06-22 00:22:34 UTC) #5
gab
On 2012/06/22 00:22:34, grt wrote: > On 2012/06/21 23:14:51, grt wrote: > > I can't ...
8 years, 6 months ago (2012-06-22 12:02:48 UTC) #6
grt (UTC plus 2)
some initial comments https://chromiumcodereview.appspot.com/10617002/diff/1/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): https://chromiumcodereview.appspot.com/10617002/diff/1/chrome/installer/util/shell_util.cc#newcode127 chrome/installer/util/shell_util.cc:127: // Returns Chrome's ProgId as "ChromeHTML|suffix|". ...
8 years, 6 months ago (2012-06-22 14:08:24 UTC) #7
gab
Hey robert: https://memegen.googleplex.com/7745708 :) FYI, the old algorithm is in patch set 2, but I ...
8 years, 6 months ago (2012-06-22 17:41:59 UTC) #8
gab
Adresssed greg's initial comments, see below. http://codereview.chromium.org/10617002/diff/1/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): http://codereview.chromium.org/10617002/diff/1/chrome/installer/util/shell_util.cc#newcode127 chrome/installer/util/shell_util.cc:127: // Returns Chrome's ...
8 years, 6 months ago (2012-06-22 18:24:04 UTC) #9
robertshield
http://codereview.chromium.org/10617002/diff/12002/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): http://codereview.chromium.org/10617002/diff/12002/chrome/installer/util/shell_util.cc#newcode843 chrome/installer/util/shell_util.cc:843: if (!GetOldUserSpecificRegistrySuffix(&old_suffix)) { add a comment saying that this ...
8 years, 6 months ago (2012-06-22 19:20:22 UTC) #10
gab
Comments addressed. I also tested on Windows 7: new-install, over-install on Chrome 19 which is ...
8 years, 6 months ago (2012-06-22 20:32:12 UTC) #11
gab
http://codereview.chromium.org/10617002/diff/22001/chrome/installer/util/shell_util_unittest.cc File chrome/installer/util/shell_util_unittest.cc (right): http://codereview.chromium.org/10617002/diff/22001/chrome/installer/util/shell_util_unittest.cc#newcode418 chrome/installer/util/shell_util_unittest.cc:418: const unsigned char test_array[] = { 'f', 'o', 'o', ...
8 years, 6 months ago (2012-06-22 20:34:23 UTC) #12
robertshield
lgtm, a few nits could be addressed later. http://codereview.chromium.org/10617002/diff/27001/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): http://codereview.chromium.org/10617002/diff/27001/chrome/installer/util/shell_util.cc#newcode104 chrome/installer/util/shell_util.cc:104: PLOG(DFATAL) ...
8 years, 6 months ago (2012-06-22 21:15:38 UTC) #13
gab
Thanks, done. http://codereview.chromium.org/10617002/diff/27001/chrome/installer/util/shell_util.cc File chrome/installer/util/shell_util.cc (right): http://codereview.chromium.org/10617002/diff/27001/chrome/installer/util/shell_util.cc#newcode104 chrome/installer/util/shell_util.cc:104: PLOG(DFATAL) << "GetUserName failed"; On 2012/06/22 21:15:39, ...
8 years, 6 months ago (2012-06-22 23:54:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10617002/29002
8 years, 6 months ago (2012-06-22 23:55:58 UTC) #15
commit-bot: I haz the power
8 years, 6 months ago (2012-06-23 02:01:40 UTC) #16
Change committed as 143782

Powered by Google App Engine
This is Rietveld 408576698