Bug 970201 - Change manifestUrl to manifestURL in WebapManager._autoUpdates aData argument. r=wesj
authorMartyn Haigh <martyn.haigh@gmail.com>
Tue, 18 Feb 2014 16:54:08 +0000
changeset 170790 c7d38d7390b1173acd1572720ffe4fc242cad53c
parent 170789 3c2965b5214b3ecae193fe1fc6d54eb6ef76001f
child 170791 b9398216b902ad59054fe26c020e731fa123b527
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewerswesj
bugs970201
milestone30.0a1
Bug 970201 - Change manifestUrl to manifestURL in WebapManager._autoUpdates aData argument. r=wesj
mobile/android/base/webapp/InstallHelper.java
mobile/android/modules/WebappManager.jsm
--- a/mobile/android/base/webapp/InstallHelper.java
+++ b/mobile/android/base/webapp/InstallHelper.java
@@ -77,17 +77,17 @@ public class InstallHelper implements Ge
             message = new JSONObject();
         }
 
         // we can change the profile to be in the app's area here
         GeckoProfile profile = GeckoProfile.get(mContext, profileName);
 
         try {
             message.put("apkPackageName", mApkResources.getPackageName());
-            message.put("manifestUrl", mApkResources.getManifestUrl());
+            message.put("manifestURL", mApkResources.getManifestUrl());
             message.put("title", mApkResources.getAppName());
             message.put("manifest", new JSONObject(mApkResources.getManifest(mContext)));
 
             String appType = mApkResources.getWebappType();
             message.putOpt("type", appType);
             if ("packaged".equals(appType)) {
                 message.putOpt("updateManifest", new JSONObject(mApkResources.getMiniManifest(mContext)));
             }
--- a/mobile/android/modules/WebappManager.jsm
+++ b/mobile/android/modules/WebappManager.jsm
@@ -241,25 +241,16 @@ this.WebappManager = {
           break;
       }
     });
   },
 
   _autoUpdate: function(aData, aOldApp) { return Task.spawn((function*() {
     log("_autoUpdate app of type " + aData.type);
 
-    // The data object has a manifestUrl property for the manifest URL,
-    // but updateHostedApp expects it to be called manifestURL, and we pass
-    // the data object to it, so we need to change the name.
-    // TODO: rename this to manifestURL upstream, so the data object always has
-    // a consistent name for the property (even if we name it differently
-    // internally).
-    aData.manifestURL = aData.manifestUrl;
-    delete aData.manifestUrl;
-
     if (aData.type == "hosted") {
       let oldManifest = yield DOMApplicationRegistry.getManifestFor(aData.manifestURL);
       DOMApplicationRegistry.updateHostedApp(aData, aOldApp.id, aOldApp, oldManifest, aData.manifest);
     } else {
       DOMApplicationRegistry.updatePackagedApp(aData, aOldApp.id, aOldApp, aData.manifest);
     }
   }).bind(this)); },