Bug 1167294 - follow-up, use #ifdef instead of AppConstants. r=me

--HG--
extra : rebase_source : b6b3ab72ba4bdb65b06d89425ab16a3525add9cd
This commit is contained in:
Jared Wein 2015-06-03 13:42:26 -04:00
Родитель ec60257924
Коммит 30b2eea9fd
1 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -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) {