зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1167294 - follow-up, use #ifdef instead of AppConstants. r=me
--HG-- extra : rebase_source : b6b3ab72ba4bdb65b06d89425ab16a3525add9cd
This commit is contained in:
Родитель
ec60257924
Коммит
30b2eea9fd
|
@ -2626,16 +2626,16 @@ let DefaultBrowserCheck = {
|
|||
|
||||
setAsDefault: function() {
|
||||
let claimAllTypes = true;
|
||||
if (AppConstants.platform == "win") {
|
||||
try {
|
||||
// In Windows 8+, the UI for selecting default protocol is much
|
||||
// nicer than the UI for setting file type associations. So we
|
||||
// only show the protocol association screen on Windows 8+.
|
||||
// Windows 8 is version 6.2.
|
||||
let version = Services.sysinfo.getProperty("version");
|
||||
claimAllTypes = (parseFloat(version) < 6.2);
|
||||
} catch (ex) { }
|
||||
}
|
||||
#ifdef XP_WIN
|
||||
try {
|
||||
// In Windows 8+, the UI for selecting default protocol is much
|
||||
// nicer than the UI for setting file type associations. So we
|
||||
// only show the protocol association screen on Windows 8+.
|
||||
// Windows 8 is version 6.2.
|
||||
let version = Services.sysinfo.getProperty("version");
|
||||
claimAllTypes = (parseFloat(version) < 6.2);
|
||||
} catch (ex) { }
|
||||
#endif
|
||||
try {
|
||||
ShellService.setDefaultBrowser(claimAllTypes, false);
|
||||
} catch (ex) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче