backout c5961842578e CLOSED TREE
authorWes Johnston <wjohnston@mozilla.com>
Tue, 21 Aug 2012 13:39:39 -0700
changeset 102964 f27460e427ccc20d895ba707415a57b215eb970a
parent 102963 228414e0953377a2cf2b9292a06e76f52915b15c
child 102965 4814d0570ca2564dbdb68f320c12c35189b85bfa
push id23317
push userryanvm@gmail.com
push dateWed, 22 Aug 2012 02:05:02 +0000
treeherderautoland@abc17059522b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone17.0a1
backs outc5961842578e037826200d73e6871819414552d4
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
backout c5961842578e CLOSED TREE
mobile/android/base/AndroidManifest.xml.in
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoAppShell.java
mobile/android/base/Makefile.in
mobile/android/base/MarketplaceApp.java.in
mobile/android/base/WebAppAllocator.java
mobile/android/base/resources/drawable/marketplace.png
mobile/android/chrome/content/HelperApps.js
mobile/android/chrome/content/WebAppRT.js
mobile/android/chrome/content/browser.js
mobile/android/locales/en-US/chrome/browser.properties
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -88,17 +88,16 @@
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="file" />
                 <data android:scheme="http" />
                 <data android:scheme="https" />
                 <data android:mimeType="text/html"/>
                 <data android:mimeType="text/plain"/>
                 <data android:mimeType="application/xhtml+xml"/>
             </intent-filter>
-
             <intent-filter>
                 <action android:name="android.intent.action.WEB_SEARCH" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.BROWSABLE" />
                 <data android:scheme="" />
                 <data android:scheme="http" />
                 <data android:scheme="https" />
             </intent-filter>
@@ -107,35 +106,16 @@
             <intent-filter>
                 <action android:name="org.mozilla.gecko.DEBUG" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
 
 #include @OBJDIR@/WebAppManifestFragment.xml.in
 
-        <activity android:name=".MarketplaceApp"
-                  android:label="Mozilla Marketplace"
-                  android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
-                  android:windowSoftInputMode="stateUnspecified|adjustResize"
-                  android:icon="@drawable/marketplace"
-                  android:launchMode="singleTask"
-                  android:theme="@style/Gecko.NoActionBar"
-                  android:noHistory="true">
-
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="http" android:host="marketplace.mozilla.org"/>
-                <data android:scheme="https" android:host="marketplace.mozilla.org"/>
-            </intent-filter>
-
-        </activity>
-
         <!-- Masquerade as the Resolver so that we can be opened from the Marketplace. -->
         <activity-alias
             android:name="com.android.internal.app.ResolverActivity"
             android:targetActivity=".App"
             android:exported="true" />
 
         <receiver android:name="NotificationHandler">
             <intent-filter>
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -166,17 +166,17 @@ abstract public class GeckoApp
     private AbsoluteLayout mPluginContainer;
 
     private FullScreenHolder mFullScreenPluginContainer;
     private View mFullScreenPluginView;
 
     private HashMap<String, PowerManager.WakeLock> mWakeLocks = new HashMap<String, PowerManager.WakeLock>();
 
     protected int mRestoreMode = GeckoAppShell.RESTORE_NONE;
-    protected boolean mInitialized = false;
+    private boolean mInitialized = false;
 
     public enum LaunchState {Launching, WaitForDebugger,
                              Launched, GeckoRunning, GeckoExiting};
     private static LaunchState sLaunchState = LaunchState.Launching;
 
     abstract public int getLayout();
     abstract public boolean hasTabsSideBar();
     abstract protected String getDefaultProfileName();
@@ -1916,17 +1916,17 @@ abstract public class GeckoApp
             Log.i(LOGTAG,"Intent : BOOKMARK - " + uri);
         }
     }
 
     /*
      * Handles getting a uri from and intent in a way that is backwards
      * compatable with our previous implementations
      */
-    protected String getURIFromIntent(Intent intent) {
+    private String getURIFromIntent(Intent intent) {
         String uri = intent.getDataString();
         if (uri != null)
             return uri;
 
         final String action = intent.getAction();
         if ((action != null && action.startsWith(ACTION_WEBAPP_PREFIX)) || ACTION_BOOKMARK.equals(action)) {
             uri = intent.getStringExtra("args");
             if (uri != null && uri.startsWith("--url=")) {
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -812,24 +812,20 @@ public class GeckoAppShell
         if (forInstall)
             index = WebAppAllocator.getInstance(GeckoApp.mAppContext).findAndAllocateIndex(aUniqueURI);
         else
             index = WebAppAllocator.getInstance(GeckoApp.mAppContext).getIndexForApp(aUniqueURI);
 
         if (index == -1)
             return null;
 
-        return getWebAppIntent(index, aURI);
-    }
-
-    public static Intent getWebAppIntent(int aIndex, String aURI) {
         Intent intent = new Intent();
-        intent.setAction(GeckoApp.ACTION_WEBAPP_PREFIX + aIndex);
+        intent.setAction(GeckoApp.ACTION_WEBAPP_PREFIX + index);
         intent.setData(Uri.parse(aURI));
-        intent.setClassName(GeckoApp.mAppContext, GeckoApp.mAppContext.getPackageName() + ".WebApps$WebApp" + aIndex);
+        intent.setClassName(GeckoApp.mAppContext, GeckoApp.mAppContext.getPackageName() + ".WebApps$WebApp" + index);
         return intent;
     }
 
     // "Installs" an application by creating a shortcut
     // This is the entry point from AndroidBridge.h
     static void createShortcut(String aTitle, String aURI, String aIconData, String aType) {
         if ("webapp".equals(aType)) {
             Log.e(LOGTAG, "createShortcut with no unique URI should not be used for aType = webapp!");
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -164,17 +164,16 @@ FENNEC_JAVA_FILES = \
   $(NULL)
 
 ifdef MOZ_WEBSMS_BACKEND
 FENNEC_JAVA_FILES += GeckoSmsManager.java
 endif
 
 FENNEC_PP_JAVA_FILES = \
   App.java \
-  MarketplaceApp.java \
   WebApp.java \
   WebApps.java \
   GeckoActivity.java \
   LauncherShortcuts.java \
   NotificationHandler.java \
   Restarter.java \
   db/BrowserContract.java \
   db/BrowserProvider.java \
@@ -997,17 +996,16 @@ MOZ_ANDROID_DRAWABLES += \
   mobile/android/base/resources/drawable/tabs_level.xml                         \
   mobile/android/base/resources/drawable/tabs_tray_bg_repeat.xml                \
   mobile/android/base/resources/drawable/tabs_tray_selected_bg_repeat.xml       \
   mobile/android/base/resources/drawable/tabs_tray_active_selector.xml          \
   mobile/android/base/resources/drawable/tabs_tray_default_selector.xml         \
   mobile/android/base/resources/drawable/tabs_tray_list_divider.xml             \
   mobile/android/base/resources/drawable/tabs_shadow.xml                        \
   mobile/android/base/resources/drawable/shadow.png                             \
-  mobile/android/base/resources/drawable/marketplace.png                        \
   $(NULL)
 
 MOZ_ANDROID_DRAWABLES += $(shell if test -e $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources.mn; then cat $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources.mn | tr '\n' ' ';  fi)
 
 RESOURCES=$(RES_LAYOUT) $(RES_LAYOUT_LAND_V14) $(RES_LAYOUT_LARGE_V11) $(RES_LAYOUT_XLARGE_V11) $(RES_VALUES) $(RES_VALUES_LAND) $(RES_VALUES_V11) $(RES_VALUES_LARGE_V11) $(RES_VALUES_XLARGE_V11) $(RES_VALUES_LAND_V14) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_NODPI) $(RES_DRAWABLE_BASE) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_HDPI) $(RES_DRAWABLE_XHDPI) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_DRAWABLE_LAND_V14) $(RES_DRAWABLE_LAND_MDPI_V14) $(RES_DRAWABLE_LAND_HDPI_V14) $(RES_DRAWABLE_LAND_XHDPI_V14) $(RES_DRAWABLE_LARGE_MDPI_V11) $(RES_DRAWABLE_LARGE_HDPI_V11) $(RES_DRAWABLE_LARGE_XHDPI_V11) $(RES_DRAWABLE_XLARGE_MDPI_V11) $(RES_DRAWABLE_XLARGE_HDPI_V11) $(RES_DRAWABLE_XLARGE_XHDPI_V11) $(RES_COLOR) $(RES_MENU)
 
 RES_DIRS= \
   res/layout                    \
deleted file mode 100644
--- a/mobile/android/base/MarketplaceApp.java.in
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#filter substitution
-package @ANDROID_PACKAGE_NAME@;
-
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.SystemClock;
-import android.util.Log;
-import android.view.MenuItem;
-
-import org.json.JSONObject;
-
-import org.mozilla.gecko.GeckoApp;
-import org.mozilla.gecko.GeckoAppShell;
-import org.mozilla.gecko.GeckoEvent;
-import org.mozilla.gecko.WebAppAllocator;
-
-/*
-* This is a stub activity, meant to just install the marketplace WebApp
-* and then launch it
-*/
-public class MarketplaceApp extends WebApp {
-    protected int mWebAppIndex;
-    private static final String LOGTAG = "GeckoMarketplaceApp";
-    public static final String MARKETPLACE_HOST = "marketplace.mozilla.org";
-    public static final String MARKETPLACE_URI = "https://marketplace.mozilla.org";
-
-    @Override
-    public void onCreate(Bundle savedInstanceState)
-    {
-        super.onCreate(savedInstanceState);
-
-        // Check that the uri being requested is a marketplace uri
-        String passedUri = null;
-        String uri = getURIFromIntent(getIntent());
-        if (uri != null && uri.length() > 0) {
-            passedUri = uri;
-        }
-
-        if (passedUri != null)
-            handleMarketplaceLink(passedUri);
-    }
-
-    // Use the default profile in order to ensure this is installed in the Fennec
-    // webapp registry. The marketplace WEBapp will have its own profile
-    @Override
-    protected String getDefaultProfileName() {
-        return "default";
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - onNewIntent");
-
-        if (checkLaunchState(LaunchState.GeckoExiting)) {
-            // We're exiting and shouldn't try to do anything else just incase
-            // we're hung for some reason we'll force the process to exit
-            System.exit(0);
-            return;
-        }
-
-        // if we were previously OOM killed, we can end up here when launching
-        // from external shortcuts, so set this as the intent for initialization
-        if (!mInitialized) {
-            setIntent(intent);
-            return;
-        }
-
-        final String action = intent.getAction();
-        if (Intent.ACTION_VIEW.equals(action)) {
-            String uri = intent.getDataString();
-            if (Uri.parse(uri).getHost().equals(MARKETPLACE_HOST)) {
-                handleMarketplaceLink(uri);
-                return;
-            }
-            GeckoAppShell.sendEventToGecko(GeckoEvent.createURILoadEvent(uri));
-            Log.i(LOGTAG,"onNewIntent: " + uri);
-        }
-    }
-
-    // All marketplace links from the system will come to the receiver first. It will determine if the
-    // marketplace app is installed. If the marketplace is not installed it will install it and send the link
-    // to the marketplace app
-    private void handleMarketplaceLink(final String url) {
-        // see if the marketplace app is registered, if its not, install it
-        int index = WebAppAllocator.getInstance(this).getIndexForApp(MARKETPLACE_URI);
-        if (index < 0) {
-            // If the app isn't installed, we send gecko a message to install it and then launch it with this url
-            JSONObject args = new JSONObject();
-            try {
-                args.put("url", url);
-            } catch (Exception e) {
-                Log.e(LOGTAG, "error building JSON arguments");
-            }
-
-            GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("WebApps:InstallMarketplace", args.toString()));
-        } else {
-            // otherwise just launch the webapp with this url
-            Intent webappIntent = GeckoAppShell.getWebAppIntent(index, url);
-            if (webappIntent == null) {
-                Log.i(LOGTAG, "bounce launch");
-                return;
-            }
-            Log.i(LOGTAG, "Open " + url + " in marketplace app");
-            startActivity(webappIntent);
-        }
-    }
-};
-
--- a/mobile/android/base/WebAppAllocator.java
+++ b/mobile/android/base/WebAppAllocator.java
@@ -17,28 +17,23 @@ public class WebAppAllocator {
     public static WebAppAllocator getInstance() {
         return getInstance(GeckoApp.mAppContext);
     }
 
     public static synchronized WebAppAllocator getInstance(Context cx) {
         if (sInstance == null) {
             if (!(cx instanceof GeckoApp))
                 throw new RuntimeException("Context needs to be a GeckoApp");
-
+                
             sContext = (GeckoApp) cx;
             sInstance = new WebAppAllocator(cx);
         }
 
-        // The marketplaceApp will run in this same process, but has a different context
-        // Rather than just failing, we want to create a new Allocator instead
-        if (cx != sContext) {
-            sInstance = null;
-            sContext = (GeckoApp) cx;
-            sInstance = new WebAppAllocator(cx);
-        }
+        if (cx != sContext)
+            throw new RuntimeException("Tried to get WebAppAllocator instance for different context than it was created for");
 
         return sInstance;
     }
 
     SharedPreferences mPrefs;
 
     protected WebAppAllocator(Context context) {
         mPrefs = context.getSharedPreferences("webapps", Context.MODE_PRIVATE | Context.MODE_MULTI_PROCESS);
deleted file mode 100644
index a30095135d4d64de1bb2bbf867472bc484ec8c58..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/chrome/content/HelperApps.js
+++ b/mobile/android/chrome/content/HelperApps.js
@@ -43,63 +43,18 @@ var HelperApps =  {
       let urlApp = urlHandlers.queryElementAt(i, Ci.nsIHandlerApp);
       if (!this.defaultHttpHandlers[urlApp.name]) {
         found.push(urlApp);
       }
     }
     return found;
   },
   
-  openUriInApp: function openUriInApp(uri) {
+  openUriInApp: function openUriInApp(uri) { 
     var possibleHandlers = this.getAppsForUri(uri);
     if (possibleHandlers.length == 1) {
       possibleHandlers[0].launchWithURI(uri);
     } else if (possibleHandlers.length > 0) {
       let handlerInfoProto = this.urlHandlerService.getURLHandlerInfoFromOS(uri, {});
       handlerInfoProto.preferredApplicationHandler.launchWithURI(uri);
     }
-  },
-
-  showDoorhanger: function showDoorhanger(aUri, aCallback) {
-    let permValue = Services.perms.testPermission(aUri, "native-intent");
-    if (permValue != Services.perms.UNKNOWN_ACTION) {
-      if (permValue == Services.perms.ALLOW_ACTION) {
-        if (aCallback)
-          aCallback(aUri);
-
-        this.openUriInApp(aUri);
-      } else if (permValue == Services.perms.DENY_ACTION) {
-        // do nothing
-      }
-      return;
-    }
-
-    let apps = this.getAppsForUri(aUri);
-    let strings = Strings.browser;
-
-    let message = "";
-    if (apps.length == 1)
-      message = strings.formatStringFromName("helperapps.openWithApp2", [apps[0].name], 1);
-    else
-      message = strings.GetStringFromName("helperapps.openWithList2");
-  
-    let buttons = [{
-      label: strings.GetStringFromName("helperapps.open"),
-      callback: function(aChecked) {
-        if (aChecked)
-          Services.perms.add(aUri, "native-intent", Ci.nsIPermissionManager.ALLOW_ACTION);
-        if (aCallback)
-          aCallback(aUri);
-        else
-          this.openUriInApp(aUri);
-      }
-    }, {
-      label: strings.GetStringFromName("helperapps.ignore"),
-      callback: function(aChecked) {
-        if (aChecked)
-          Services.perms.add(aUri, "native-intent", Ci.nsIPermissionManager.DENY_ACTION);
-      }
-    }];
-
-    let options = { checkbox: Strings.browser.GetStringFromName("helperapps.dontAskAgain") };
-    NativeWindow.doorhanger.show(message, "helperapps-open", buttons, BrowserApp.selectedTab.id, options);
   }
 };
--- a/mobile/android/chrome/content/WebAppRT.js
+++ b/mobile/android/chrome/content/WebAppRT.js
@@ -33,21 +33,16 @@ var WebAppRT = {
   init: function(isUpdate, url) {
     this.deck = document.getElementById("browsers");
     this.deck.addEventListener("click", this, false, true);
 
     // on first run, update any prefs
     if (isUpdate == "new") {
       this.getDefaultPrefs().forEach(this.addPref);
 
-      // prevent offering to use helper apps for things that this app handles
-      // i.e. don't show the "Open in market?" popup when we're showing the market app
-      let uri = Services.io.newURI(url, null, null);
-      Services.perms.add(uri, "native-intent", Ci.nsIPermissionManager.DENY_ACTION);
-
       // update the blocklist url to use a different app id
       let blocklist = Services.prefs.getCharPref("extensions.blocklist.url");
       blocklist = blocklist.replace(/%APP_ID%/g, "webapprt-mobile@mozilla.org");
       Services.prefs.setCharPref("extensions.blocklist.url", blocklist);
     }
   },
 
   getDefaultPrefs: function() {
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -242,17 +242,17 @@ var BrowserApp = {
       if (window.arguments[3])
         gScreenHeight = window.arguments[3];
       if (window.arguments[4])
         pinned = window.arguments[4];
     }
 
     let updated = this.isAppUpdated();
     if (pinned) {
-      WebAppRT.init(updated, url);
+      WebAppRT.init(updated);
     } else {
       SearchEngines.init();
       this.initContextMenu();
     }
 
     if (url == "about:empty")
       loadParams.flags = Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY;
 
@@ -1985,17 +1985,16 @@ var UserAgent = {
 
 function nsBrowserAccess() {
 }
 
 nsBrowserAccess.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow]),
 
   _getBrowser: function _getBrowser(aURI, aOpener, aWhere, aContext) {
-    console.log("GetBrowser");
     let isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
     if (isExternal && aURI && aURI.schemeIs("chrome"))
       return null;
 
     let loadflags = isExternal ?
                       Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
                       Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
     if (aWhere == Ci.nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW) {
@@ -2724,17 +2723,16 @@ Tab.prototype = {
               tabID: this.id
             }
           });
         }
         break;
       }
 
       case "DOMWillOpenModalDialog": {
-        console.log("DOMWillOpenModalDialog");
         if (!aEvent.isTrusted)
           return;
 
         // We're about to open a modal dialog, make sure the opening
         // tab is brought to the front.
         let tab = BrowserApp.getTabForWindow(aEvent.target.top);
         BrowserApp.selectTab(tab);
         break;
@@ -2923,43 +2921,31 @@ Tab.prototype = {
 
     let fixedURI = aLocationURI;
     try {
       fixedURI = URIFixup.createExposableURI(aLocationURI);
     } catch (ex) { }
 
     let documentURI = contentWin.document.documentURIObject.spec;
     let contentType = contentWin.document.contentType;
-
+    
     // If fixedURI matches browser.lastURI, we assume this isn't a real location
     // change but rather a spurious addition like a wyciwyg URI prefix. See Bug 747883.
     // Note that we have to ensure fixedURI is not the same as aLocationURI so we
     // don't false-positive page reloads as spurious additions.
     let sameDocument = (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) != 0 ||
                        ((this.browser.lastURI != null) && fixedURI.equals(this.browser.lastURI) && !fixedURI.equals(aLocationURI));
     this.browser.lastURI = fixedURI;
 
     // Reset state of click-to-play plugin notifications.
     clearTimeout(this.pluginDoorhangerTimeout);
     this.pluginDoorhangerTimeout = null;
     this.shouldShowPluginDoorhanger = true;
     this.clickToPlayPluginsActivated = false;
 
-    // This is where we might check for helper apps.
-    // For now it is special cased to only check for the marketplace urls
-    if (WebappsUI.isMarketplace(aLocationURI)) {
-      // the marketplace app may not actually be installed, so instead we use a custom
-      // callback that will install and launch it for us if necessary
-      HelperApps.showDoorhanger(aLocationURI, function() {
-        WebappsUI.installAndLaunchMarketplace(aLocationURI.spec);
-        if (aRequest)
-          aRequest.cancel(Cr.NS_OK);
-      });
-    }
-
     let message = {
       gecko: {
         type: "Content:LocationChange",
         tabID: this.id,
         uri: fixedURI.spec,
         documentURI: documentURI,
         contentType: contentType,
         sameDocument: sameDocument
@@ -5960,26 +5946,24 @@ var WebappsUI = {
     Cu.import("resource://gre/modules/Webapps.jsm");
     DOMApplicationRegistry.allAppsLaunchable = true;
 
     Services.obs.addObserver(this, "webapps-ask-install", false);
     Services.obs.addObserver(this, "webapps-launch", false);
     Services.obs.addObserver(this, "webapps-sync-install", false);
     Services.obs.addObserver(this, "webapps-sync-uninstall", false);
     Services.obs.addObserver(this, "webapps-install-error", false);
-    Services.obs.addObserver(this, "WebApps:InstallMarketplace", false);
   },
   
   uninit: function unint() {
     Services.obs.removeObserver(this, "webapps-ask-install");
     Services.obs.removeObserver(this, "webapps-launch");
     Services.obs.removeObserver(this, "webapps-sync-install");
     Services.obs.removeObserver(this, "webapps-sync-uninstall");
     Services.obs.removeObserver(this, "webapps-install-error", false);
-    Services.obs.removeObserver(this, "WebApps:InstallMarketplace", false);
   },
 
   DEFAULT_PREFS_FILENAME: "default-prefs.js",
 
   observe: function observe(aSubject, aTopic, aData) {
     let data = {};
     try { data = JSON.parse(aData); }
     catch(ex) { }
@@ -6035,65 +6019,16 @@ var WebappsUI = {
       case "webapps-sync-uninstall":
         sendMessageToJava({
           gecko: {
             type: "WebApps:Uninstall",
             uniqueURI: data.origin
           }
         });
         break;
-      case "WebApps:InstallMarketplace":
-        this.installAndLaunchMarketplace(data.url);
-        break;
-    }
-  },
-
-  MARKETPLACE: {
-      MANIFEST: "https://marketplace.mozilla.org/manifest.webapp",
-      get URI() {
-        delete this.URI;
-        return this.URI = Services.io.newURI(this.MANIFEST, null, null);
-      }
-  },
-
-  isMarketplace: function isMarketplace(aUri) {
-    return aUri.host == this.MARKETPLACE.URI.host;
-  },
-
-  // installs the marketplace, if a url is passed in, will launch it when the install
-  // is complete
-  installAndLaunchMarketplace: function installAndLaunchMarketplace(aLaunchUrl) {
-    // TODO: Add a flag to hide other install prompt dialogs. This should be silent if possible
-    let request = navigator.mozApps.getInstalled();
-    request.onsuccess = function() {
-      let foundMarket = false;
-      for (let i = 0; i < request.result.length; i++) {
-        if (request.result[i].origin == this.MARKETPLACE.URI.prePath)
-          foundMarket = true;
-      }
-
-      let launchFun = (function() {
-        if (aLaunchUrl)
-          WebappsUI.openURL(aLaunchUrl || WebappsUI.MARKETPLACE.URI.prePath, WebappsUI.MARKETPLACE.URI.prePath);
-      }).bind(this);
-
-      if (foundMarket) {
-        launchFun();
-      } else {
-        let r = navigator.mozApps.install(WebappsUI.MARKETPLACE.MANIFEST);
-        r.onsuccess = function() {
-          launchFun();
-        };
-        r.onerror = function() {
-          console.log("error installing market " + this.error.name);
-        };
-      }
-    };
-    request.onerror = function() {
-      console.log("error getting installed " + this.error.name);
     }
   },
 
   getBiggestIcon: function getBiggestIcon(aIcons, aOrigin) {
     const DEFAULT_ICON = "chrome://browser/skin/images/default-app-icon.png";
     if (!aIcons)
       return DEFAULT_ICON;
   
@@ -6123,23 +6058,17 @@ var WebappsUI = {
     }
 
     return iconURI ? iconURI.spec : DEFAULT_ICON;
   },
 
   doInstall: function doInstall(aData) {
     let manifest = new DOMApplicationManifest(aData.app.manifest, aData.app.origin);
     let name = manifest.name ? manifest.name : manifest.fullLaunchPath();
-    let showPrompt = true;
-
-    // skip showing the prompt if this is for the marketplace app
-    if (aData.app.origin == this.MARKETPLACE.URI.prePath)
-      showPrompt = false;
-
-    if (!showPrompt || Services.prompt.confirm(null, Strings.browser.GetStringFromName("webapps.installTitle"), name)) {
+    if (Services.prompt.confirm(null, Strings.browser.GetStringFromName("webapps.installTitle"), name)) {
       // Add a homescreen shortcut -- we can't use createShortcut, since we need to pass
       // a unique ID for Android webapp allocation
       this.makeBase64Icon(this.getBiggestIcon(manifest.icons, Services.io.newURI(aData.app.origin, null, null)),
         (function(icon) {
           let profilePath = sendMessageToJava({
             gecko: {
               type: "WebApps:Install",
               name: manifest.name,
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -273,13 +273,10 @@ masterPassword.incorrect=Incorrect passw
 # dialog that prompts the user to allow the incoming connection.
 remoteIncomingPromptTitle=Incoming Connection
 # LOCALIZATION NOTE (remoteIncomingPromptMessage): The message displayed on the
 # dialog that prompts the user to allow the incoming connection.
 remoteIncomingPromptMessage=An incoming request to permit remote debugging connection was detected. A remote client can take complete control over your browser! Allow connection?
 remoteIncomingPromptDisable=Disable
 
 # Helper apps
-helperapps.open=Open
-helperapps.ignore=Ignore
-helperapps.dontAskAgain=Don't ask again for this site
 helperapps.openWithApp2=Open With %S App
 helperapps.openWithList2=Open With an App