Merge m-c to inbound.
authorRyan VanderMeulen <ryanvm@gmail.com>
Sun, 13 Jan 2013 09:39:32 -0500
changeset 118722 43d65f5d22b2f97df965f4d79da56b4e8568fcb4
parent 118719 5af0e3f7df096d69b7fff389d5402364da0ea02f (current diff)
parent 118721 b78592e34853eeecdec94eb7335bbd1435774dcf (diff)
child 118723 1671d04d9259f5f936e7796cf9dee247c2e33fd2
child 127204 0347a748ae4afdfcb642a0f3f98fb7251cd3b12b
push id21218
push userryanvm@gmail.com
push dateSun, 13 Jan 2013 14:39:39 +0000
treeherdermozilla-inbound@43d65f5d22b2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone21.0a1
first release with
nightly linux32
43d65f5d22b2 / 21.0a1 / 20130114031033 / files
nightly linux64
43d65f5d22b2 / 21.0a1 / 20130114031033 / files
nightly mac
43d65f5d22b2 / 21.0a1 / 20130114031033 / files
nightly win32
43d65f5d22b2 / 21.0a1 / 20130114031033 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Merge m-c to inbound.
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -17,16 +17,18 @@ function DataNotificationInfoBar() {
 }
 
 DataNotificationInfoBar.prototype = {
   _OBSERVERS: [
     "datareporting:notify-data-policy:request",
     "datareporting:notify-data-policy:close",
   ],
 
+  _DATA_REPORTING_NOTIFICATION: "data-reporting",
+
 #ifdef MOZ_TELEMETRY_REPORTING
 #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
   _PREF_TELEMETRY_DISPLAYED: "toolkit.telemetry.notifiedOptOut",
 #else
   _PREF_TELEMETRY_DISPLAYED: "toolkit.telemetry.prompted",
 #endif
 
   _TELEMETRY_DISPLAY_REV: 2,
@@ -59,20 +61,27 @@ DataNotificationInfoBar.prototype = {
     nb.setAttribute("flex", "1");
 
     let bottombox = document.getElementById("browser-bottombox");
     bottombox.insertBefore(nb, bottombox.firstChild);
 
     this._notificationBox = nb;
   },
 
+  _getDataReportingNotification: function (name=this._DATA_REPORTING_NOTIFICATION) {
+    if (!this._notificationBox) {
+      return undefined;
+    }
+    return this._notificationBox.getNotificationWithValue(name);
+  },
+
   _displayDataPolicyInfoBar: function (request) {
     this._ensureNotificationBox();
 
-    if (this._notificationBox.getNotificationWithValue("data-reporting")) {
+    if (this._getDataReportingNotification()) {
       return;
     }
 
     let policy = Cc["@mozilla.org/datareporting/service;1"]
                    .getService(Ci.nsISupports)
                    .wrappedJSObject
                    .policy;
 
@@ -99,17 +108,17 @@ DataNotificationInfoBar.prototype = {
         actionTaken = true;
         window.openAdvancedPreferences("dataChoicesTab");
       },
     }];
 
     this._log.info("Creating data reporting policy notification.");
     let notification = this._notificationBox.appendNotification(
       message,
-      "data-reporting",
+      this._DATA_REPORTING_NOTIFICATION,
       null,
       this._notificationBox.PRIORITY_INFO_HIGH,
       buttons,
       function onEvent(event) {
         if (event == "removed") {
           if (!actionTaken) {
             request.onUserAccept("info-bar-dismissed");
           }
@@ -128,22 +137,20 @@ DataNotificationInfoBar.prototype = {
     Services.prefs.setIntPref(this._PREF_TELEMETRY_DISPLAYED,
                               this._TELEMETRY_DISPLAY_REV);
 
     // Tell the notification request we have displayed the notification.
     request.onUserNotifyComplete();
   },
 
   _clearPolicyNotification: function () {
-    if (!this._notificationBox ||
-        !this._notificationBox.getNotificationWithValue("data-reporting")) {
-      return;
+    let notification = this._getDataReportingNotification();
+    if (notification) {
+      notification.close();
     }
-
-    this._notificationBox.getNotificationWithValue("date-reporting").close();
   },
 
   onNotifyDataPolicy: function (request) {
     try {
       this._displayDataPolicyInfoBar(request);
     } catch (ex) {
       request.onUserNotifyFailed(ex);
     }
--- a/browser/locales/en-US/chrome/browser/aboutHealthReport.dtd
+++ b/browser/locales/en-US/chrome/browser/aboutHealthReport.dtd
@@ -1,8 +1,12 @@
+<!-- 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/. -->
+
 <!-- metrics.locale-direction instead of the usual local.dir entity, so RTL can skip translating page. -->
 <!ENTITY abouthealth.locale-direction "ltr">
 
 <!-- LOCALIZATION NOTE (abouthealth.pagetitle): Firefox Health Report is a proper noun in en-US, please keep this in mind. -->
 <!ENTITY abouthealth.pagetitle "&brandShortName; Health Report">
 <!ENTITY abouthealth.header "&brandFullName; Health Report">
 
 <!ENTITY abouthealth.intro.title "What is &brandShortName; Health Report?">