Bug 1534290 p2 - Touch timePasswordChanged on password modification. r=nalexander a=pascalc
authorEdouard Oger <eoger@fastmail.com>
Mon, 18 Mar 2019 16:22:14 +0000
changeset 525656 ca7498a112a57cecf230de625565c7adfad0df2e
parent 525655 521bfa11e24897365a5dbe4301afa4038aa08449
child 525657 3abb046ddc034f4c04f59302012acc81154834b6
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander, pascalc
bugs1534290
milestone67.0
Bug 1534290 p2 - Touch timePasswordChanged on password modification. r=nalexander a=pascalc Depends on D23233 Differential Revision: https://phabricator.services.mozilla.com/D23234
mobile/android/chrome/content/aboutLogins.js
--- a/mobile/android/chrome/content/aboutLogins.js
+++ b/mobile/android/chrome/content/aboutLogins.js
@@ -293,16 +293,19 @@ var Logins = {
           let propBag = Cc["@mozilla.org/hash-property-bag;1"].
             createInstance(Ci.nsIWritablePropertyBag);
           if (newUsername !== origUsername) {
             propBag.setProperty("username", newUsername);
           }
           if (newPassword !== origPassword) {
             propBag.setProperty("password", newPassword);
           }
+          // Sync relies on timePasswordChanged to decide whether
+          // or not to sync a login, so touch it.
+          propBag.setProperty("timePasswordChanged", Date.now());
           Services.logins.modifyLogin(logins[i], propBag);
           break;
         }
       }
     } catch (e) {
       Snackbars.show(gStringBundle.GetStringFromName("editLogin.couldNotSave"), Snackbars.LENGTH_LONG);
       return;
     }