зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1133862 - Remove MSE debug User Agent string. r=mconley
This reverts bug 1127448, removing the build id from the user agent string we send to youtube in non-release builds. Now that the feature is in release we no longer need this code for testing.
This commit is contained in:
Родитель
7b1bbb9ff6
Коммит
26d26823cd
|
@ -122,13 +122,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
|
|||
"resource://gre/modules/UpdateChannel.jsm");
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MOZ_UPDATE_CHANNEL) && MOZ_UPDATE_CHANNEL != release
|
||||
#define MOZ_DEBUG_UA // Shorthand define for subsequent conditional sections.
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UserAgentOverrides",
|
||||
"resource://gre/modules/UserAgentOverrides.jsm");
|
||||
#endif
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "ShellService", function() {
|
||||
try {
|
||||
return Cc["@mozilla.org/browser/shell-service;1"].
|
||||
|
@ -727,11 +720,6 @@ BrowserGlue.prototype = {
|
|||
Services.prefs.addObserver(POLARIS_ENABLED, this, false);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_DEBUG_UA
|
||||
UserAgentOverrides.init();
|
||||
DebugUserAgent.init();
|
||||
#endif
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
let themeName = gBrowserBundle.GetStringFromName("deveditionTheme.name");
|
||||
let vendorShortName = gBrandBundle.GetStringFromName("vendorShortName");
|
||||
|
@ -1003,9 +991,6 @@ BrowserGlue.prototype = {
|
|||
if (Services.prefs.getBoolPref("dom.identity.enabled")) {
|
||||
SignInToWebsiteUX.uninit();
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_DEBUG_UA
|
||||
UserAgentOverrides.uninit();
|
||||
#endif
|
||||
webrtcUI.uninit();
|
||||
FormValidationHandler.uninit();
|
||||
|
@ -2975,36 +2960,3 @@ let globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessag
|
|||
globalMM.addMessageListener("UITour:onPageEvent", function(aMessage) {
|
||||
UITour.onPageEvent(aMessage, aMessage.data);
|
||||
});
|
||||
|
||||
#ifdef MOZ_DEBUG_UA
|
||||
// Modify the user agent string for specific domains
|
||||
// to route debug information through their logging.
|
||||
var DebugUserAgent = {
|
||||
DEBUG_UA: null,
|
||||
DOMAINS: [
|
||||
'youtube.com',
|
||||
'www.youtube.com',
|
||||
'youtube-nocookie.com',
|
||||
'www.youtube-nocookie.com',
|
||||
],
|
||||
|
||||
init: function() {
|
||||
// Only run if the MediaSource Extension API is available.
|
||||
if (!Services.prefs.getBoolPref("media.mediasource.enabled")) {
|
||||
return;
|
||||
}
|
||||
// Install our override filter.
|
||||
UserAgentOverrides.addComplexOverride(this.onRequest.bind(this));
|
||||
let ua = Cc["@mozilla.org/network/protocol;1?name=http"]
|
||||
.getService(Ci.nsIHttpProtocolHandler).userAgent;
|
||||
this.DEBUG_UA = ua + " Build/" + Services.appinfo.appBuildID;
|
||||
},
|
||||
|
||||
onRequest: function(channel, defaultUA) {
|
||||
if (this.DOMAINS.indexOf(channel.URI.host) != -1) {
|
||||
return this.DEBUG_UA;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
};
|
||||
#endif // MOZ_DEBUG_UA
|
||||
|
|
Загрузка…
Ссылка в новой задаче