Bug 815743 - Part 2: Backed out bug 588909. a=lsblakk
authorDão Gottwald <dao@mozilla.com>
Fri, 10 Aug 2012 20:48:09 +0200
changeset 110380 57899cae65c7d1eb375db9a83e964560586cfe77
parent 110379 691d7b21472485f573ccc70bb4d502f3590a2ee7
child 110381 6654e39790e4babff748e5fb32fd767c743e8a07
push id227
push usereakhgari@mozilla.com
push dateTue, 27 Nov 2012 23:06:29 +0000
treeherdermozilla-release@57899cae65c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsblakk
bugs815743, 588909
milestone17.0
Bug 815743 - Part 2: Backed out bug 588909. a=lsblakk
browser/branding/official/configure.sh
configure.in
netwerk/protocol/http/nsHttpHandler.cpp
--- a/browser/branding/official/configure.sh
+++ b/browser/branding/official/configure.sh
@@ -1,5 +1,6 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MOZ_APP_DISPLAYNAME=Firefox
+MOZ_UA_BUILDID=20100101
--- a/configure.in
+++ b/configure.in
@@ -8384,16 +8384,18 @@ AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "
 AC_SUBST(MOZ_APP_VERSION)
 AC_SUBST(MOZ_APP_MAXVERSION)
 AC_DEFINE_UNQUOTED(FIREFOX_VERSION,$FIREFOX_VERSION)
 AC_SUBST(FIREFOX_VERSION)
 AC_SUBST(MOZ_UA_OS_AGNOSTIC)
 if test -n "$MOZ_UA_OS_AGNOSTIC"; then
   AC_DEFINE(MOZ_UA_OS_AGNOSTIC)
 fi
+AC_DEFINE_UNQUOTED(MOZ_UA_BUILDID, "$MOZ_UA_BUILDID")
+AC_SUBST(MOZ_UA_BUILDID)
 
 # We can't use the static application.ini data when building against
 # a libxul SDK.
 if test -n "$LIBXUL_SDK"; then
     MOZ_APP_STATIC_INI=
 fi
 AC_SUBST(MOZ_APP_STATIC_INI)
 
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -268,17 +268,25 @@ nsHttpHandler::Init()
     mSessionStartTime = NowInSeconds();
 
     rv = mAuthCache.Init();
     if (NS_FAILED(rv)) return rv;
 
     rv = InitConnectionMgr();
     if (NS_FAILED(rv)) return rv;
 
+#ifdef ANDROID
     mProductSub.AssignLiteral(MOZILLA_UAVERSION);
+#else
+    mProductSub.AssignLiteral(MOZ_UA_BUILDID);
+#endif
+    if (mProductSub.IsEmpty() && appInfo)
+        appInfo->GetPlatformBuildID(mProductSub);
+    if (mProductSub.Length() > 8)
+        mProductSub.SetLength(8);
 
 #if DEBUG
     // dump user agent prefs
     LOG(("> legacy-app-name = %s\n", mLegacyAppName.get()));
     LOG(("> legacy-app-version = %s\n", mLegacyAppVersion.get()));
     LOG(("> platform = %s\n", mPlatform.get()));
     LOG(("> oscpu = %s\n", mOscpu.get()));
     LOG(("> misc = %s\n", mMisc.get()));