Bug 786613 Port |Bug 782453 - Add site-specific User Agent infrastructure| r=Neil.

This commit is contained in:
Philip Chee 2012-08-31 20:15:14 +08:00
Родитель 76df8473e2
Коммит 5317470e39
2 изменённых файлов: 11 добавлений и 2 удалений

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

@ -32,7 +32,12 @@ pref("general.autoScroll", true);
pref("general.useragent.compatMode.firefox", true);
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last
// Send aol.com the legacy build date instead of the version number in the UA's
// Gecko token as a temporary measure against bug 778408 (mail.aol.com defaults
// to basic web UI when accessed with a user agent without Gecko/20100101).
pref("general.useragent.override.aol.com", "Gecko/[^ ]*#Gecko/20100101");
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
pref("browser.startup.page", 1);
pref("browser.startup.homepage", "chrome://navigator-region/locale/region.properties");
pref("browser.startup.homepage.count", 1);

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

@ -13,6 +13,9 @@ Components.utils.import("resource:///modules/mailnewsMigrator.js");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UserAgentOverrides",
"resource://gre/modules/UserAgentOverrides.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
@ -278,6 +281,7 @@ SuiteGlue.prototype = {
Services.obs.removeObserver(this, "places-database-locked");
if (this._isPlacesShutdownObserver)
Services.obs.removeObserver(this, "places-shutdown");
UserAgentOverrides.uninit();
},
// profile is available
@ -306,7 +310,7 @@ SuiteGlue.prototype = {
Services.prefs.savePrefFile(null);
}
// once we support a safe mode popup, it should be called here
UserAgentOverrides.init();
},
// Browser startup complete. All initial windows have opened.