Closed
Bug 1184508
Opened 10 years ago
Closed 10 years ago
Remember registry hash for later use on Win8+
Categories
(Firefox :: Shell Integration, defect)
Tracking
()
RESOLVED
FIXED
Firefox 42
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(4 files, 3 obsolete files)
14.94 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
14.90 KB,
patch
|
lmandel
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
14.87 KB,
patch
|
lmandel
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
14.88 KB,
patch
|
Details | Diff | Splinter Review |
We have to use the default apps UI on Win8+ because associations are protected by a cryptographic hash and we can't tell how to calculate the hash value from the scratch.
Once the hash value is calculated, however, we can remember the value to bypass the default apps UI from then onward. In particular, if Firefox was the default browser before upgrading from Windows 8.1, the user can take back the default browser from Microsoft Edge without being bothered by the boring UI.
Even if the hash value is changed, Firefox will fallback to the current method (i.e. launch the default apps UI). So this is a strict UX improvement.
Attachment #8634685 -
Flags: review?(jmathies)
Assignee | ||
Updated•10 years ago
|
Summary: Remember registry hash for later use on Win8 → Remember registry hash for later use on Win8+
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
![]() |
||
Comment 1•10 years ago
|
||
What is the hash based on?
Assignee | ||
Comment 2•10 years ago
|
||
Just copying values calculated by the default apps UI. Therefore this patch can't bypass the dialog at first.
For file extensions, values are taken from HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FIleExts\<ext>\UserChoice. For URL protocols, values are taken from HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\<protocol>\UserChoice.
![]() |
||
Comment 3•10 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #2)
> Just copying values calculated by the default apps UI. Therefore this patch
> can't bypass the dialog at first.
> For file extensions, values are taken from
> HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FIleExts\<ext>\UserCh
> oice. For URL protocols, values are taken from
> HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\<protocol>
> \UserChoice.
I'm working on getting my win8 laptop updated and built so I can test this. I'll come back to it later today.
Brian you worked with these hashes back when we were doing win8 default browser updates. Any thoughts on the approach here - trying to preserve these values after they have been set?
Flags: needinfo?(netzen)
Comment 4•10 years ago
|
||
Maybe a bit intrusive but something like that works for me. I remember testing out an application for fast metro status sharing back when that was a thing with win8. During install time it did the same thing of asking you to set the default for each first so it could copy out the value. I think we have registry wrappers already, seems like overkill to make new ones.
Flags: needinfo?(netzen)
![]() |
||
Comment 5•10 years ago
|
||
None of this patch applies to tip cleanly, mind updating?
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 6•10 years ago
|
||
* Rebased to tip.
* Used nsIWindowsRegKey instead of reinventing the wheel.
Attachment #8634685 -
Attachment is obsolete: true
Attachment #8634685 -
Flags: review?(jmathies)
Flags: needinfo?(VYV03354)
Attachment #8635647 -
Flags: review?(jmathies)
Assignee | ||
Comment 7•10 years ago
|
||
![]() |
||
Comment 8•10 years ago
|
||
Comment on attachment 8635647 [details] [diff] [review]
patch v2
Review of attachment 8635647 [details] [diff] [review]:
-----------------------------------------------------------------
ZGenerally looks great but I'm concerned about jank on the main thread.
::: browser/components/shell/nsWindowsShellService.cpp
@@ +276,5 @@
> 0, nullptr, nullptr, &si, &pi)) {
> return NS_ERROR_FAILURE;
> }
>
> + if (aWait) {
This is on the main thread and will jank the entire browser UI for the duration. Are we sure we need this? I there any way we can do this async?
Attachment #8635647 -
Flags: review?(jmathies) → review-
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #8)
> This is on the main thread and will jank the entire browser UI for the
> duration. Are we sure we need this? I there any way we can do this async?
This is needed only if the default browser is changed from a different Firefox installation. So I think we can live without this. Most users will install only one Firefox instance. Also, Firefox will fallback to the old method even if it fails to set the default browser.
Attachment #8635647 -
Attachment is obsolete: true
Attachment #8636289 -
Flags: review?(jmathies)
Assignee | ||
Comment 10•10 years ago
|
||
To be clear, v3 removed the aWait parameter.
![]() |
||
Comment 11•10 years ago
|
||
Comment on attachment 8636289 [details] [diff] [review]
patch v3
Review of attachment 8636289 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/shell/nsWindowsShellService.cpp
@@ +370,5 @@
> +
> + LPCWSTR progID = isProtocol ? L"FirefoxURL" : L"FirefoxHTML";
> + bool isDefault = !wcsicmp(registeredApp, progID);
> + CoTaskMemFree(registeredApp);
> + if (!isDefault) {
looks like you can return isDefault here instead.
Attachment #8636289 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8636289 -
Attachment is obsolete: true
Attachment #8636854 -
Flags: review+
Comment 14•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Comment 15•10 years ago
|
||
This looks like a patch that we'll want on Firefox 40 so we can get it to users hopefully before they upgrade to Windows 10 and lose their default web browser association.
:emk, I read through the code and it looks like we'll want it for Firefox 40. Can you confirm that if we get this on Firefox 40 and users run it on Windows 8 before updating to Windows 10, their "default browser" experience will be a lot better? (note that we only have a few more days to get the uplift requests in and landed on beta before the final betas will be built)
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #15)
> This looks like a patch that we'll want on Firefox 40 so we can get it to
> users hopefully before they upgrade to Windows 10 and lose their default web
> browser association.
>
> :emk, I read through the code and it looks like we'll want it for Firefox
> 40. Can you confirm that if we get this on Firefox 40 and users run it on
> Windows 8 before updating to Windows 10, their "default browser" experience
> will be a lot better? (note that we only have a few more days to get the
> uplift requests in and landed on beta before the final betas will be built)
Yes, I confirmed using Windows 8.1 VM and Build 10320 ISO.
Flags: needinfo?(VYV03354)
Comment 17•10 years ago
|
||
[Tracking Requested - why for this release]:
We have done a lot of work towards default browser UI with Firefox 40, as the default browser UI is much more complicated in Windows 10.
Can you please rebase the patch for mozilla-aurora and mozilla-beta? It looks like mozilla-aurora just needs the header file moved up to the top of the file but mozilla-beta needs more manual rebasing.
status-firefox40:
--- → affected
status-firefox41:
--- → affected
tracking-firefox40:
--- → ?
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 18•10 years ago
|
||
Approval Request Comment
[Feature/regressing bug #]: N/A
[User impact if declined]: Default browser UX would be much worse on Windows 10.
[Describe test coverage new/current, TreeHerder]: Manually tested.
[Risks and why]: Low. Even if Firefox fails to set the default, it will fallback to the current method.
[String/UUID change made/needed]: none
Flags: needinfo?(VYV03354)
Attachment #8637502 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 19•10 years ago
|
||
Approval Request Comment
See the above request comment for aurora.
Attachment #8637503 -
Flags: approval-mozilla-beta?
Assignee | ||
Comment 20•10 years ago
|
||
Bug 791501 will conflict with this bug. If bug 791501 get a beta-approval, please use this patch instead.
Comment 21•10 years ago
|
||
Comment on attachment 8637503 [details] [diff] [review]
patch for beta
This change has been manually tested. Worst case this should fall back to the existing behaviour if there is a failure. We'll take this change in support of browser default in Windows 10 in beta7. Please verify the fix in beta as well. Beta+ Aurora+
Attachment #8637503 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Updated•10 years ago
|
Attachment #8637502 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 23•10 years ago
|
||
Comment 24•10 years ago
|
||
Comment 25•10 years ago
|
||
Setting for verification in Beta from either Masatoshi or Softvision.
Flags: qe-verify+
Assignee | ||
Comment 26•10 years ago
|
||
I verified this using the latest Firefox 40 beta and Windows 10 RTM.
Comment 27•10 years ago
|
||
Removing qe-verify+ flag since Masatoshi verified this in Firefox 40 Beta, and that should suffice.
Flags: qe-verify+
Comment 28•9 years ago
|
||
I need to understand this a little better, can someone answer these questions?
1. Starting with Fx40 if the user has Firefox as a default on Windows 8 or 8.1 we store the hash so that we can reapply the change when the user upgrades to 10 and they decide to set Firefox as default again, we can do it without an interstitial dialog?
2. If the user upgrades from 39 to 40 on Win8 and has Firefox as default, do we store this hash, or does the user have to reapply the default change for us to catch it?
3. If the user upgrades from 7 there is no hash to store so we fall back to the associations settings pane, right?
Assignee | ||
Comment 29•9 years ago
|
||
(In reply to Nick Nguyen [:osunick] from comment #28)
> 1. Starting with Fx40 if the user has Firefox as a default on Windows 8 or
> 8.1 we store the hash so that we can reapply the change when the user
> upgrades to 10 and they decide to set Firefox as default again, we can do it
> without an interstitial dialog?
Yes.
> 2. If the user upgrades from 39 to 40 on Win8 and has Firefox as default, do
> we store this hash, or does the user have to reapply the default change for
> us to catch it?
If the user launches Firefox 40 on Win8, the hash will be stored. Firefox will check if it is the default and store the hash if it is.
> 3. If the user upgrades from 7 there is no hash to store so we fall back to
> the associations settings pane, right?
Right.
You need to log in
before you can comment on or make changes to this bug.
Description
•