Back out f2ac70bee1e0 (bug 798358) until it tells us what jsonobj it is talking about
authorPhil Ringnalda <philringnalda@gmail.com>
Tue, 07 May 2013 14:39:59 -0700
changeset 142143 e5d3816c2fa91cfa9c51455568a855abb5e1e70e
parent 142142 883e35db4839399e0023cac094b3bc9604cca87c
child 142144 a33030103ec449f884f4969e5cad04936775453d
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs798358
milestone23.0a1
backs outf2ac70bee1e0447a2764551040cbdd476580829d
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
Back out f2ac70bee1e0 (bug 798358) until it tells us what jsonobj it is talking about CLOSED TREE
mobile/android/app/recommended-addons.json
mobile/android/base/widget/AddonsSection.java
mobile/android/components/AddonUpdateService.js
toolkit/mozapps/extensions/AddonRepository.jsm
toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
--- a/mobile/android/app/recommended-addons.json
+++ b/mobile/android/app/recommended-addons.json
@@ -1,15 +1,15 @@
 {
     "addons": [{
         "id": "fullscreen@mbrubeck.limpet.net",
         "name": "Full Screen",
         "version": "3.4",
         "iconURL": "https://addons.cdn.mozilla.net/img/uploads/addon_icons/252/252573-32.png?modified=1354183977",
-        "learnmoreURL": "https://addons.mozilla.org/en-US/android/addon/full-screen-252573/?src=api"
+        "homepageURL": "https://addons.mozilla.org/en-US/android/addon/full-screen-252573/?src=api"
     }, {
         "id": "cloudviewer@starkravingfinkle.org",
         "name": "Cloud Viewer",
         "version": "2.1",
         "iconURL": "https://addons.cdn.mozilla.net/img/uploads/addon_icons/295/295895-32.png?modified=1353947644",
-        "learnmoreURL": "https://addons.mozilla.org/en-US/android/addon/cloud-viewer/?src=api"
+        "homepageURL": "https://addons.mozilla.org/en-US/android/addon/cloud-viewer/?src=api"
     }]
 }
--- a/mobile/android/base/widget/AddonsSection.java
+++ b/mobile/android/base/widget/AddonsSection.java
@@ -199,19 +199,17 @@ public class AddonsSection extends About
 
         Drawable drawable = mContext.getResources().getDrawable(R.drawable.ic_addons_empty);
         drawable.setBounds(sIconBounds);
         row.setCompoundDrawables(drawable, null, null, null);
 
         String iconUrl = addonJSON.getString("iconURL");
         String pageUrl = getPageUrlFromIconUrl(iconUrl);
 
-        // homepageURL may point to non-AMO installs. For now we use learnmoreURL instead
-        // which is more likely to point to a mobile AMO page
-        final String homepageUrl = jsonobj.getString("learnmoreURL");
+        final String homepageUrl = addonJSON.getString("homepageURL");
         row.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 if (mUriLoadListener != null)
                     mUriLoadListener.onAboutHomeUriLoad(homepageUrl);
             }
         });
         row.setOnKeyListener(GamepadUtils.getClickDispatcher());
--- a/mobile/android/components/AddonUpdateService.js
+++ b/mobile/android/components/AddonUpdateService.js
@@ -170,17 +170,17 @@ var RecommendedSearchResults = {
         addons: []
       };
 
       addons.forEach(function(aAddon) {
         json.addons.push({
           id: aAddon.id,
           name: aAddon.name,
           version: aAddon.version,
-          learnmoreURL: aAddon.learnmoreURL,
+          homepageURL: aAddon.homepageURL,
           iconURL: aAddon.iconURL
         })
       });
 
       let file = self._getFile();
       self._writeFile(file, JSON.stringify(json));
     });
   },
--- a/toolkit/mozapps/extensions/AddonRepository.jsm
+++ b/toolkit/mozapps/extensions/AddonRepository.jsm
@@ -217,21 +217,16 @@ AddonSearchResult.prototype = {
   screenshots: null,
 
   /**
    * The homepage for the add-on
    */
   homepageURL: null,
 
   /**
-   * The homepage for the add-on
-   */
-  learnmoreURL: null,
-
-  /**
    * The support URL for the add-on
    */
   supportURL: null,
 
   /**
    * The contribution url of the add-on
    */
   contributionURL: null,
@@ -1073,18 +1068,17 @@ this.AddonRepository = {
 
             if (previewNode.getAttribute("primary") == 1)
               addon.screenshots.unshift(screenshot);
             else
               addon.screenshots.push(screenshot);
           }
           break;
         case "learnmore":
-          addon.learnmoreURL = this._getTextContent(node);
-          addon.homepageURL = addon.homepageURL || addon.learnmoreURL;
+          addon.homepageURL = addon.homepageURL || this._getTextContent(node);
           break;
         case "contribution_data":
           let meetDevelopers = this._getDescendantTextContent(node, "meet_developers");
           let suggestedAmount = this._getDescendantTextContent(node, "suggested_amount");
           if (meetDevelopers != null) {
             addon.contributionURL = meetDevelopers;
             addon.contributionAmount = suggestedAmount;
           }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
@@ -67,17 +67,16 @@ var GET_RESULTS = [{
                             thumbnailHeight: 150,
                             caption:         "Caption 1 - 1"
                           }, {
                             url:          BASE_URL + "/full2-1.png",
                             thumbnailURL: BASE_URL + "/thumbnail2-1.png",
                             caption:      "Caption 2 - 1"
                           }],
   homepageURL:            BASE_URL + "/learnmore1.html",
-  learnmoreURL:           BASE_URL + "/learnmore1.html",
   supportURL:             BASE_URL + "/support1.html",
   contributionURL:        BASE_URL + "/meetDevelopers1.html",
   contributionAmount:     "$11.11",
   averageRating:          4,
   reviewCount:            1111,
   reviewURL:              BASE_URL + "/review1.html",
   totalDownloads:         2222,
   weeklyDownloads:        3333,
@@ -147,17 +146,16 @@ var SEARCH_RESULTS = [{
                             thumbnailURL: BASE_URL + "/thumbnail1-2.png"
                           }, {
                             url:          BASE_URL + "/full2-2.png",
                             thumbnailURL: BASE_URL + "/thumbnail2-2.png",
                             caption:      "Caption 2"
                           }],
   homepageURL:            BASE_URL + "/learnmore2.html",
   supportURL:             BASE_URL + "/support2.html",
-  learnmoreURL:           BASE_URL + "/learnmore2.html",
   contributionURL:        BASE_URL + "/meetDevelopers2.html",
   contributionAmount:     null,
   repositoryStatus:       4,
   sourceURI:              BASE_URL + "/test2.xpi"
 }, {
   id:                     "test3@tests.mozilla.org",
   type:                   "theme",
   version:                "1.3",
@@ -187,17 +185,16 @@ var SEARCH_RESULTS = [{
                             caption:      "Caption 2 - 3"
                           }, {
                             url:          BASE_URL + "/full3-3.png",
                             thumbnailURL: BASE_URL + "/thumbnail3-3.png",
                             caption:      "Caption 3 - 3"
                           }],
   homepageURL:            BASE_URL + "/homepage3.html",
   supportURL:             BASE_URL + "/support3.html",
-  learnmoreURL:           BASE_URL + "/learnmore3.html",
   contributionURL:        BASE_URL + "/meetDevelopers3.html",
   contributionAmount:     "$11.11",
   averageRating:          2,
   reviewCount:            1111,
   reviewURL:              BASE_URL + "/review3.html",
   totalDownloads:         2222,
   weeklyDownloads:        3333,
   dailyUsers:             4444,