My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 153349: Cannot set Chromium as default HTTP handler on Windows 8.
3 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by gab@chromium.org, Oct 1, 2012
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
Oct 1, 2012
#1 gab@chromium.org
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...
Status: Assigned
Labels: -Pri-1 Pri-2
Oct 1, 2012
#2 gab@chromium.org
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)).
Oct 1, 2012
#3 gab@chromium.org
(No comment was entered for this change.)
Blocking: chromium:153398
Oct 4, 2012
#4 gab@chromium.org
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.
Oct 4, 2012
#5 gideonw...@chromium.org
Sounds good and sensible to me.
Oct 4, 2012
#6 bugdro...@chromium.org
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
------------------------------------------------------------------------
Oct 4, 2012
#7 gab@chromium.org
(No comment was entered for this change.)
Status: Fixed
Oct 4, 2012
#8 azpac...@gmail.com
thanks for the fix it work for me now :)
Oct 4, 2012
#9 gab@chromium.org
Yay :), thanks for verifying!
Status: Verified
Mar 10, 2013
#10 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Area-Internals -Internals-Install Cr-Internals-Install Cr-Internals
Apr 5, 2013
#11 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Cr-Internals-Install Cr-Internals-Installer
Sign in to add a comment

Powered by Google Project Hosting