Commit 75a9e447 authored by Csoregi Natalia's avatar Csoregi Natalia
Browse files

Backed out changeset 6de570466e66 (bug 1668965) for failures on...

Backed out changeset 6de570466e66 (bug 1668965) for failures on browser_protections_lockwise.js. CLOSED TREE
parent 0038ebdf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1726,6 +1726,8 @@ pref("browser.contentblocking.report.monitor.home_page_url", "https://monitor.fi
pref("browser.contentblocking.report.manage_devices.url", "https://accounts.firefox.com/settings/clients");
pref("browser.contentblocking.report.endpoint_url", "https://monitor.firefox.com/user/breach-stats?includeResolved=true");
pref("browser.contentblocking.report.proxy_extension.url", "https://fpn.firefox.com/browser?utm_source=firefox-desktop&utm_medium=referral&utm_campaign=about-protections&utm_content=about-protections");
pref("browser.contentblocking.report.lockwise.mobile-ios.url", "https://apps.apple.com/app/id1314000270");
pref("browser.contentblocking.report.lockwise.mobile-android.url", "https://play.google.com/store/apps/details?id=mozilla.lockbox&referrer=utm_source%3Dprotection_report%26utm_content%3Dmobile_promotion");
pref("browser.contentblocking.report.mobile-ios.url", "https://apps.apple.com/app/firefox-private-safe-browser/id989804926");
pref("browser.contentblocking.report.mobile-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dprotection_report%26utm_content%3Dmobile_promotion");
pref("browser.contentblocking.report.vpn.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-card");
@@ -1885,8 +1887,11 @@ pref("signon.management.page.sort", "name");
// The utm_creative value is appended within the code (specific to the location on
// where it is clicked). Be sure that if these two prefs are updated, that
// the utm_creative param be last.
pref("signon.management.page.mobileAndroidURL", "https://app.adjust.com/6tteyjo?redirect=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dmozilla.lockbox&utm_campaign=Desktop&utm_adgroup=InProduct&utm_creative=");
pref("signon.management.page.mobileAppleURL", "https://app.adjust.com/6tteyjo?redirect=https%3A%2F%2Fitunes.apple.com%2Fapp%2Fid1314000270%3Fmt%3D8&utm_campaign=Desktop&utm_adgroup=InProduct&utm_creative=");
pref("signon.management.page.breachAlertUrl",
     "https://monitor.firefox.com/breach-details/");
pref("signon.management.page.hideMobileFooter", false);
pref("signon.management.page.showPasswordSyncNotification", true);
pref("signon.passwordEditCapture.enabled", true);
pref("signon.showAutoCompleteFooter", true);
+5 −0
Original line number Diff line number Diff line
@@ -52,6 +52,11 @@ var gExceptionPaths = [
  // Exclude all services-automation because they are used through webdriver
  "resource://gre/modules/services-automation/",
  "resource://services-automation/ServicesAutomation.jsm",

  // Bug 1550165 - Exclude localized App/Play store badges. These badges
  // are displayed in a promo area on the first load of about:logins.
  "chrome://browser/content/aboutlogins/third-party/app-store/",
  "chrome://browser/content/aboutlogins/third-party/play-store/",
];

// These are not part of the omni.ja file, so we find them only when running
+3 −0
Original line number Diff line number Diff line
@@ -148,10 +148,13 @@ let JSWINDOWACTORS = {
        AboutLoginsCreateLogin: { wantUntrusted: true },
        AboutLoginsDeleteLogin: { wantUntrusted: true },
        AboutLoginsDismissBreachAlert: { wantUntrusted: true },
        AboutLoginsHideFooter: { wantUntrusted: true },
        AboutLoginsImportFromBrowser: { wantUntrusted: true },
        AboutLoginsImportFromFile: { wantUntrusted: true },
        AboutLoginsInit: { wantUntrusted: true },
        AboutLoginsGetHelp: { wantUntrusted: true },
        AboutLoginsOpenMobileAndroid: { wantUntrusted: true },
        AboutLoginsOpenMobileIos: { wantUntrusted: true },
        AboutLoginsOpenPreferences: { wantUntrusted: true },
        AboutLoginsOpenSite: { wantUntrusted: true },
        AboutLoginsRecordTelemetryEvent: { wantUntrusted: true },
+16 −0
Original line number Diff line number Diff line
@@ -132,6 +132,10 @@ class AboutLoginsChild extends JSWindowActorChild {
        this.sendAsyncMessage("AboutLogins:GetHelp");
        break;
      }
      case "AboutLoginsHideFooter": {
        this.sendAsyncMessage("AboutLogins:HideFooter");
        break;
      }
      case "AboutLoginsImportFromBrowser": {
        this.sendAsyncMessage("AboutLogins:Import");
        recordTelemetryEvent({
@@ -148,6 +152,18 @@ class AboutLoginsChild extends JSWindowActorChild {
        });
        break;
      }
      case "AboutLoginsOpenMobileAndroid": {
        this.sendAsyncMessage("AboutLogins:OpenMobileAndroid", {
          source: event.detail,
        });
        break;
      }
      case "AboutLoginsOpenMobileIos": {
        this.sendAsyncMessage("AboutLogins:OpenMobileIos", {
          source: event.detail,
        });
        break;
      }
      case "AboutLoginsOpenPreferences": {
        this.sendAsyncMessage("AboutLogins:OpenPreferences");
        recordTelemetryEvent({
+173 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ const ABOUT_LOGINS_ORIGIN = "about:logins";
const MASTER_PASSWORD_NOTIFICATION_ID = "master-password-login-required";
const PASSWORD_SYNC_NOTIFICATION_ID = "enable-password-sync";

const HIDE_MOBILE_FOOTER_PREF = "signon.management.page.hideMobileFooter";
const SHOW_PASSWORD_SYNC_NOTIFICATION_PREF =
  "signon.management.page.showPasswordSyncNotification";

@@ -67,6 +68,123 @@ const SHOW_PASSWORD_SYNC_NOTIFICATION_PREF =
// even if it is disabled for other consumers such as about:newtab.
const EXPECTED_ABOUTLOGINS_REMOTE_TYPE = E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE;

// App store badges sourced from https://developer.apple.com/app-store/marketing/guidelines/#section-badges.
// This array mirrors the file names from the App store directory (./content/third-party/app-store)
const APP_STORE_LOCALES = [
  "az",
  "ar",
  "bg",
  "cs",
  "da",
  "de",
  "el",
  "en",
  "es-mx",
  "es",
  "et",
  "fi",
  "fr",
  "he",
  "hu",
  "id",
  "it",
  "ja",
  "ko",
  "lt",
  "lv",
  "my",
  "nb",
  "nl",
  "nn",
  "pl",
  "pt-br",
  "pt-pt",
  "ro",
  "ru",
  "si",
  "sk",
  "sv",
  "th",
  "tl",
  "tr",
  "vi",
  "zh-hans",
  "zh-hant",
];

// Google play badges sourced from https://play.google.com/intl/en_us/badges/
// This array mirrors the file names from the play store directory (./content/third-party/play-store)
const PLAY_STORE_LOCALES = [
  "af",
  "ar",
  "az",
  "be",
  "bg",
  "bn",
  "bs",
  "ca",
  "cs",
  "da",
  "de",
  "el",
  "en",
  "es",
  "et",
  "eu",
  "fa",
  "fr",
  "gl",
  "gu",
  "he",
  "hi",
  "hr",
  "hu",
  "hy",
  "id",
  "is",
  "it",
  "ja",
  "ka",
  "kk",
  "km",
  "kn",
  "ko",
  "lo",
  "lt",
  "lv",
  "mk",
  "mr",
  "ms",
  "my",
  "nb",
  "ne",
  "nl",
  "nn",
  "pa",
  "pl",
  "pt-br",
  "pt",
  "ro",
  "ru",
  "si",
  "sk",
  "sl",
  "sq",
  "sr",
  "sv",
  "ta",
  "te",
  "th",
  "tl",
  "tr",
  "uk",
  "ur",
  "uz",
  "vi",
  "zh-cn",
  "zh-tw",
];

const convertSubjectToLogin = subject => {
  subject.QueryInterface(Ci.nsILoginMetaInfo).QueryInterface(Ci.nsILoginInfo);
  const login = LoginHelper.loginToVanillaObject(subject);
@@ -147,6 +265,10 @@ class AboutLoginsParent extends JSWindowActorParent {
        Services.logins.removeLogin(login);
        break;
      }
      case "AboutLogins:HideFooter": {
        Services.prefs.setBoolPref(HIDE_MOBILE_FOOTER_PREF, true);
        break;
      }
      case "AboutLogins:SortChanged": {
        Services.prefs.setCharPref("signon.management.page.sort", message.data);
        break;
@@ -178,6 +300,31 @@ class AboutLoginsParent extends JSWindowActorParent {
        });
        break;
      }
      case "AboutLogins:OpenMobileAndroid": {
        const MOBILE_ANDROID_URL_PREF =
          "signon.management.page.mobileAndroidURL";
        const linkTrackingSource = message.data.source;
        let MOBILE_ANDROID_URL = Services.prefs.getStringPref(
          MOBILE_ANDROID_URL_PREF
        );
        // Append the `utm_creative` query parameter value:
        MOBILE_ANDROID_URL += linkTrackingSource;
        ownerGlobal.openWebLinkIn(MOBILE_ANDROID_URL, "tab", {
          relatedToCurrent: true,
        });
        break;
      }
      case "AboutLogins:OpenMobileIos": {
        const MOBILE_IOS_URL_PREF = "signon.management.page.mobileAppleURL";
        const linkTrackingSource = message.data.source;
        let MOBILE_IOS_URL = Services.prefs.getStringPref(MOBILE_IOS_URL_PREF);
        // Append the `utm_creative` query parameter value:
        MOBILE_IOS_URL += linkTrackingSource;
        ownerGlobal.openWebLinkIn(MOBILE_IOS_URL, "tab", {
          relatedToCurrent: true,
        });
        break;
      }
      case "AboutLogins:OpenPreferences": {
        ownerGlobal.openPreferences("privacy-logins");
        break;
@@ -245,6 +392,25 @@ class AboutLoginsParent extends JSWindowActorParent {
            AboutLogins.updatePasswordSyncNotificationState(syncState);
          }

          const playStoreBadgeLanguage = Services.locale.negotiateLanguages(
            Services.locale.appLocalesAsBCP47,
            PLAY_STORE_LOCALES,
            "en-us",
            Services.locale.langNegStrategyLookup
          )[0];

          const appStoreBadgeLanguage = Services.locale.negotiateLanguages(
            Services.locale.appLocalesAsBCP47,
            APP_STORE_LOCALES,
            "en-us",
            Services.locale.langNegStrategyLookup
          )[0];

          const selectedBadgeLanguages = {
            appStoreBadgeLanguage,
            playStoreBadgeLanguage,
          };

          let selectedSort = Services.prefs.getCharPref(
            "signon.management.page.sort",
            "name"
@@ -258,6 +424,7 @@ class AboutLoginsParent extends JSWindowActorParent {
            logins,
            selectedSort,
            syncState,
            selectedBadgeLanguages,
            masterPasswordEnabled: LoginHelper.isMasterPasswordSet(),
            passwordRevealVisible: Services.policies.isAllowed(
              "passwordReveal"
@@ -791,10 +958,16 @@ var AboutLogins = {
    // by other more Sync-specific pages.
    const loggedIn = state.status != UIState.STATUS_NOT_CONFIGURED;

    // Pass the pref set if user has dismissed mobile promo footer
    const dismissedMobileFooter = Services.prefs.getBoolPref(
      HIDE_MOBILE_FOOTER_PREF
    );

    return {
      loggedIn,
      email: state.email,
      avatarURL: state.avatarURL,
      hideMobileFooter: !loggedIn || dismissedMobileFooter,
      fxAccountsEnabled: FXA_ENABLED,
    };
  },
Loading