Bug 1184663 - Remove Sync promotion in password doorhanger. r=markh
authorEdouard Oger <eoger@fastmail.com>
Wed, 13 Apr 2016 15:27:00 -0400
changeset 331316 4bc2899f5d5349d2570813d35ad7fea39c410fc1
parent 331315 8f7045b63b07c01309ab451ad120eacfdaa420d1
child 331317 0260dd297a25b97b11dfa208c3d556cb7b62542c
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1184663
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1184663 - Remove Sync promotion in password doorhanger. r=markh
browser/base/content/urlbarBindings.xml
browser/locales/en-US/chrome/browser/browser.properties
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -2523,18 +2523,16 @@ file, You can obtain one at http://mozil
         ]]></setter>
       </property>
       <property name="_notificationType">
         <getter><![CDATA[
           // Use the popupid attribute to identify the notification type,
           // otherwise just rely on the panel id for common arrowpanels.
           let type = this._panel.firstChild.getAttribute("popupid") ||
                      this._panel.id;
-          if (type == "password")
-            return "passwords";
           if (type == "editBookmarkPanel")
             return "bookmarks";
           if (type == "addon-install-complete" || type == "addon-install-restart") {
             if (!Services.prefs.prefHasUserValue("services.sync.username"))
               return "addons";
             if (!Services.prefs.getBoolPref("services.sync.engine.addons"))
               return "addons-sync-disabled";
           }
@@ -2581,27 +2579,16 @@ file, You can obtain one at http://mozil
 
           // Only handle supported notification panels.
           if (!this._notificationType) {
             return;
           }
 
           let viewsLeft = this._viewsLeft;
           if (viewsLeft) {
-            let notification = this._panel.firstElementChild.notification;
-            if (this._notificationType == "passwords" && notification && notification.options &&
-                notification.options.displayURI instanceof Ci.nsIStandardURL) {
-              let fxAOrigin = new URL(Services.prefs.getCharPref("identity.fxaccounts.remote.signup.uri")).origin
-              if (notification.options.displayURI.prePath == fxAOrigin) {
-                // Somewhat gross hack - we don't want to show the sync promo while
-                // the user may be logging into Sync.
-                return;
-              }
-            }
-
             if (Services.prefs.prefHasUserValue("services.sync.username") &&
                this._notificationType != "addons-sync-disabled") {
               // If the user has already setup Sync, don't show the notification.
               this._viewsLeft = 0;
               // Be sure to hide the panel, in case it was visible and the user
               // decided to setup Sync after noticing it.
               viewsLeft = 0;
               // The panel is still hidden, just bail out.
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -440,20 +440,16 @@ safeModeRestartButton=Restart
 # up in the Firefox button. If users frequently use the "Text Encoding"
 # menu, set this to "true". Otherwise, you can leave it as "false".
 browser.menu.showCharacterEncoding=false
 
 # LOCALIZATION NOTE (syncPromoNotification.bookmarks.label): This appears in
 # the add bookmark star panel.  %S will be replaced by syncBrandShortName.
 # The final space separates this text from the Learn More link.
 syncPromoNotification.bookmarks.description=You can access your bookmarks on all your devices with %S.\u0020
-# LOCALIZATION NOTE (syncPromoNotification.passwords.label): This appears in
-# the remember password panel.  %S will be replaced by syncBrandShortName.
-# The final space separates this text from the Learn More link.
-syncPromoNotification.passwords.description=You can access your passwords on all your devices with %S.\u0020
 syncPromoNotification.learnMoreLinkText=Learn More
 # LOCALIZATION NOTE (syncPromoNotification.addons.label): This appears in
 # the add-on install complete panel when Sync isn't set.
 # %S will be replaced by syncBrandShortName.
 # The final space separates this text from the Learn More link.
 syncPromoNotification.addons.description=You can access your add-ons on all your devices with %S.\u0020
 # LOCALIZATION NOTE (syncPromoNotification.addons-sync-disabled.label):
 # This appears in the add-on install complete panel when Sync is set