Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 153349 Cannot set Chromium as default HTTP handler on Windows 8.
Starred by 3 users Project Member Reported by gab@chromium.org, Oct 1, 2012 Back to list
Status: Verified
Owner: gab@chromium.org
Closed: Oct 2012
Cc: grt@chromium.org, gideonwald@chromium.org, robertshield@chromium.org
Components:
OS: Windows
Pri: 2
Type: Bug

Blocking:
issue 153398


Sign in to add a comment
Version: r159494
OS: Windows 8

What steps will reproduce the problem?
1. Install Chromium (not Chrome)
2. Try to set it as default.

What is the expected output?
Click "Chromium" in the greg dialog (the browser choice Win8 dialog) and have it become the HTTP handler.

What do you see instead?
"Chromium" doesn't show up in the list of browsers available in the greg dialog (see SS -- after invoking make default from Chromium).
 
nochromium_gregdialog.png
24.1 KB View Download
Comment 1 by gab@chromium.org, Oct 1, 2012
Labels: -Pri-1 Pri-2
Status: Assigned
So, the problem is that Chromium's progid for user-level installs is "ChromiumHTML.{26 chars suffix}" which is exactly 39 characters in length.

As per MSDN, a valid progid has a maximum length of 39 characters: http://msdn.microsoft.com/library/aa911706.aspx

In fact the suffix generation method we currently use (generating a 26 chars suffix) was chosen for many of its properties including that it satisfied our tightest constraint (i.e. that it made exactly 39 characters with the longest prefix we have for progids, e.g. "ChromiumHTML.").

Upon making this decision we did not know what having an invalid progid did so that we could not test this... we were simply acting out of good faith, trying our best to respect the MSDN docs.

***However it appears that Windows 8 only considers a valid progid, one that has less than or equal to 39 characters INCLUDING the NULL character...***

For example, here is a patch that can fix this for someone building anew and re-installing from scratch:
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 113b479..f12b453 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -958,7 +958,7 @@ const wchar_t* ShellUtil::kAppPathsRegistryPathName = L"Path";
 const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromeHTML";
 const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chrome HTML Document";
 #else
-const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromiumHTML";
+const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromiuHTML";
 const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chromium HTML Document";
 #endif

However, this cannot be checked in as is as migration code is required for auto-updates to go smoothly. As well as cleanup code on uninstall...
Comment 2 by gab@chromium.org, Oct 1, 2012
FWIW, the same Windows 8 validation affects the Default Program dialog (i.e. when selection defaults for Chromium: HTTP/HTTPS are listed, but when selecting those and saving, the defaults are not set for these two (although they are for every other protocol using the same progid)).
Comment 3 by gab@chromium.org, Oct 1, 2012
Blocking: chromium:153398
Comment 4 by gab@chromium.org, Oct 4, 2012
I just thought this through, I'll just change the progid which will result in:

1) On new-installs: no problemo.
2) Updating a Chromium that was never made default: all good, but HKCU\Software\Classes\ChromiumHTML will be left behind on uninstall (harmless)
3) Updating a Chromium that was made default: Chromium is still default, but it might think it's not, remaking it default through the infobar/settings will register everything appropriately again -- this will require UAC on Win7- (HKLM\Software\Classes\ChromiumHTML left
behind on uninstall).

I've tested various forms of updates and all seemed well.
Sounds good and sensible to me.
Project Member Comment 6 by bugdroid1@chromium.org, Oct 4, 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=160173

------------------------------------------------------------------------
r160173 | gab@chromium.org | 2012-10-04T18:37:02.383701Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/installer/util/shell_util.cc?r1=160173&r2=160172&pathrev=160173

ChromiumHTM instead of ChromiumHTML to respect progid restriction of 39 characters INCLUDING the NULL character...

See http://crbug.com/153349 for more dtails.

BUG= 153349 
TEST=Chromium can be set as default on Win8.
Updating the old Chromium with this new progid makes it think it's not default, but it can be made default again and everything is good.

Review URL: https://chromiumcodereview.appspot.com/11035024
------------------------------------------------------------------------
Comment 7 by gab@chromium.org, Oct 4, 2012
Status: Fixed
Comment 8 by azpac...@gmail.com, Oct 5, 2012
thanks for the fix it work for me now :)
Comment 9 by gab@chromium.org, Oct 5, 2012
Status: Verified
Yay :), thanks for verifying!
Project Member Comment 10 by bugdroid1@chromium.org, Mar 10, 2013
Labels: -Area-Internals -Internals-Install Cr-Internals-Install Cr-Internals
Project Member Comment 11 by bugdroid1@chromium.org, Apr 5, 2013
Labels: -Cr-Internals-Install Cr-Internals-Installer
Sign in to add a comment