Merge fxteam to m-c
authorWes Kocher <wkocher@mozilla.com>
Mon, 21 Oct 2013 20:32:55 -0400
changeset 151550 177bf37a49f5b55eb00f2ce6d295fdc6b56cdb76
parent 151535 e844717bea5d30559c7004187ec7e08be8c1db12 (current diff)
parent 151549 9faa8e2237db9e5275f5015126120f33ddc760f2 (diff)
child 151553 fee649b730fe1d7d1c59e2a2438cf86c0a8f1d65
child 151590 fb6e7e47499b0b97a7bff221b4becb6648b771ae
child 151625 4942026233a46ba5f5e115c6d156d5da20d6cb8c
child 155899 9f7332a3a241202f8d2ef68d5fa5b7432c4ff77c
child 161474 80715c6f37ba44891354086ec905d61f70b8e113
push id25500
push userkwierso@gmail.com
push dateTue, 22 Oct 2013 00:33:10 +0000
treeherdermozilla-central@177bf37a49f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone27.0a1
first release with
nightly linux32
177bf37a49f5 / 27.0a1 / 20131022030202 / files
nightly linux64
177bf37a49f5 / 27.0a1 / 20131022030202 / files
nightly mac
177bf37a49f5 / 27.0a1 / 20131022030202 / files
nightly win32
177bf37a49f5 / 27.0a1 / 20131022030202 / files
nightly win64
177bf37a49f5 / 27.0a1 / 20131022030202 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge fxteam to m-c
mobile/android/services/android-drawable-hdpi-resources.mn
mobile/android/services/android-drawable-ldpi-resources.mn
mobile/android/services/android-drawable-mdpi-resources.mn
mobile/android/services/android-drawable-resources.mn
mobile/android/services/android-layout-resources.mn
mobile/android/services/android-values-resources.mn
mobile/android/services/java-sources.mn
mobile/android/services/java-third-party-sources.mn
mobile/android/services/preprocess-sources.mn
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -670,18 +670,16 @@ pref("pfs.datasource.url", "https://pfs.
 pref("plugins.hide_infobar_for_blocked_plugin", false);
 pref("plugins.hide_infobar_for_outdated_plugin", false);
 
 pref("plugins.update.url", "https://www.mozilla.org/%LOCALE%/plugincheck/");
 pref("plugins.update.notifyUser", false);
 
 pref("plugins.click_to_play", true);
 
-pref("plugins.clickToActivateInfo.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/clicktoplay");
-
 // let all plugins except Flash default to click-to-play
 pref("plugin.default.state", 1);
 pref("plugin.state.flash", 2);
 
 // display door hanger if flash not installed
 pref("plugins.notifyMissingFlash", true);
 
 #ifdef XP_WIN
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -700,17 +700,17 @@ var gPluginHandler = {
       // TODO: allow the blocklist to specify a better link, bug 873093
       if (pluginInfo.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE) {
         url = Services.urlFormatter.formatURLPref("plugins.update.url");
       }
       else if (pluginInfo.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
         url = Services.blocklist.getPluginBlocklistURL(pluginInfo.pluginTag);
       }
       else {
-        url = Services.urlFormatter.formatURLPref("plugins.clickToActivateInfo.url");
+        url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "clicktoplay";
       }
       pluginInfo.detailsLink = url;
 
       centerActions.push(pluginInfo);
     }
 
     if (centerActions.length == 0) {
       // TODO: this is a temporary band-aid to avoid broken doorhangers
--- a/browser/devtools/inspector/inspector-panel.js
+++ b/browser/devtools/inspector/inspector-panel.js
@@ -21,16 +21,43 @@ loader.lazyGetter(this, "SelectorSearch"
 
 const LAYOUT_CHANGE_TIMER = 250;
 
 /**
  * Represents an open instance of the Inspector for a tab.
  * The inspector controls the highlighter, the breadcrumbs,
  * the markup view, and the sidebar (computed view, rule view
  * and layout view).
+ *
+ * Events:
+ * - ready
+ *      Fired when the inspector panel is opened for the first time and ready to
+ *      use
+ * - new-root
+ *      Fired after a new root (navigation to a new page) event was fired by
+ *      the walker, and taken into account by the inspector (after the markup
+ *      view has been reloaded)
+ * - markuploaded
+ *      Fired when the markup-view frame has loaded
+ * - layout-change
+ *      Fired when the layout of the inspector changes
+ * - breadcrumbs-updated
+ *      Fired when the breadcrumb widget updates to a new node
+ * - layoutview-updated
+ *      Fired when the layoutview (box model) updates to a new node
+ * - markupmutation
+ *      Fired after markup mutations have been processed by the markup-view
+ * - computed-view-refreshed
+ *      Fired when the computed rules view updates to a new node
+ * - computed-view-property-expanded
+ *      Fired when a property is expanded in the computed rules view
+ * - computed-view-property-collapsed
+ *      Fired when a property is collapsed in the computed rules view
+ * - rule-view-refreshed
+ *      Fired when the rule view updates to a new node
  */
 function InspectorPanel(iframeWindow, toolbox) {
   this._toolbox = toolbox;
   this._target = toolbox._target;
   this.panelDoc = iframeWindow.document;
   this.panelWin = iframeWindow;
   this.panelWin.inspector = this;
 
@@ -315,16 +342,17 @@ InspectorPanel.prototype = {
         return;
       }
       this.selection.setNodeFront(defaultNode, "navigateaway");
 
       this._initMarkup();
       this.once("markuploaded", () => {
         this.markup.expandNode(this.selection.nodeFront);
         this.setupSearchBox();
+        this.emit("new-root");
       });
     });
   },
 
   _selectionCssSelector: null,
 
   /**
    * Set the currently selected node unique css selector.
--- a/browser/devtools/inspector/test/browser_inspector_bug_922125_destroy_on_navigate.js
+++ b/browser/devtools/inspector/test/browser_inspector_bug_922125_destroy_on_navigate.js
@@ -5,62 +5,81 @@ let Toolbox = devtools.Toolbox;
 let TargetFactory = devtools.TargetFactory;
 
 function test() {
   waitForExplicitFinish();
 
   const URL_1 = "data:text/html;charset=UTF-8,<div id='one' style='color:red;'>ONE</div>";
   const URL_2 = "data:text/html;charset=UTF-8,<div id='two' style='color:green;'>TWO</div>";
 
-  let inspector;
+  let toolbox, inspector;
 
   // open tab, load URL_1, and wait for load to finish
   let tab = gBrowser.selectedTab = gBrowser.addTab();
   let target = TargetFactory.forTab(gBrowser.selectedTab);
+  let deferred = promise.defer();
   let browser = gBrowser.getBrowserForTab(tab);
 
-  function onPageOneLoad() {
-    browser.removeEventListener("load", onPageOneLoad, true);
+  function onTabLoad() {
+    browser.removeEventListener("load", onTabLoad, true);
+    deferred.resolve(null);
+  }
+  browser.addEventListener("load", onTabLoad, true);
+  browser.loadURI(URL_1);
 
-    gDevTools.showToolbox(target).then(aToolbox => {
-      return aToolbox.selectTool("inspector");
-    }).then(i => {
+  // open devtools panel
+  deferred.promise.then(() => {
+    return gDevTools.showToolbox(target, null, Toolbox.HostType.BOTTOM);
+  }).then(aToolbox => {
+    toolbox = aToolbox;
+  }).then(() => {
+    // select the inspector
+    return toolbox.selectTool("inspector").then(i => {
       inspector = i;
 
       // Verify we are on page one
       let testNode = content.document.querySelector("#one");
       ok(testNode, "We have the test node on page 1");
 
       assertMarkupViewIsLoaded();
+    });
+  }).then(() => {
+    // navigate to URL_2
+    let deferred = promise.defer();
 
-      // Listen to will-navigate to check if the view is empty
-      target.on("will-navigate", () => {
-        info("Navigation to page 2 has started, the inspector should be empty");
-        assertMarkupViewIsEmpty();
-      });
-      inspector.once("markuploaded", () => {
-        info("Navigation to page 2 was done, the inspector should be back up");
+    // Listen to will-navigate to check if the view is empty
+    target.on("will-navigate", () => {
+      info("Navigation to page 2 has started, the inspector should be empty");
+      assertMarkupViewIsEmpty();
+    });
+    inspector.once("new-root", () => {
+      info("Navigation to page 2 was done, the inspector should be back up");
 
-        // Verify we are on page one
-        let testNode = content.document.querySelector("#two");
-        ok(testNode, "We have the test node on page 2");
+      // Verify we are on page one
+      let testNode = content.document.querySelector("#two");
+      ok(testNode, "We have the test node on page 2");
+
+      // On page 2 load, verify we have the right content
+      assertMarkupViewIsLoaded();
 
-        // On page 2 load, verify we have the right content
-        assertMarkupViewIsLoaded();
-        endTests();
+      inspector.selection.setNode(content.document.querySelector("#two"));
+      inspector.once("inspector-updated", () => {
+        deferred.resolve();
       });
+    });
 
-      // Navigate to page 2
+    inspector.selection.setNode(content.document.querySelector("#one"));
+    inspector.once("inspector-updated", () => {
       browser.loadURI(URL_2);
     });
-  }
 
-  // Navigate to page 1
-  browser.addEventListener("load", onPageOneLoad, true);
-  browser.loadURI(URL_1);
+    return deferred.promise;
+  }).then(() => {
+    endTests();
+  });
 
   function assertMarkupViewIsLoaded() {
     let markupViewBox = inspector.panelDoc.getElementById("markup-box");
     is(markupViewBox.childNodes.length, 1, "The markup-view is loaded");
   }
 
   function assertMarkupViewIsEmpty() {
     let markupViewBox = inspector.panelDoc.getElementById("markup-box");
--- a/browser/metro/base/content/bindings/bindings.xml
+++ b/browser/metro/base/content/bindings/bindings.xml
@@ -189,18 +189,24 @@
         <![CDATA[
           let box = this.inputField.parentNode;
           box.showContextMenu(this, event, false);
         ]]>
       </handler>
       <handler event="click" phase="capturing">
         <![CDATA[
         if (event.mozInputSource == Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH) {
-          SelectionHelperUI.attachEditSession(ChromeSelectionHandler,
-                                              event.clientX, event.clientY);
+          if (typeof SelectionHelperUI != 'undefined') {
+            SelectionHelperUI.attachEditSession(ChromeSelectionHandler,
+                                                event.clientX, event.clientY);
+          } else {
+            // If we don't have access to SelectionHelperUI then we are using this
+            // binding for browser content (e.g. about:config)
+            Services.obs.notifyObservers(event, "attach_edit_session_to_content", "");
+          }
         }
       ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="search-textbox" extends="chrome://global/content/bindings/textbox.xml#search-textbox">
     <implementation>
@@ -282,16 +288,22 @@
           ContextMenuUI.showContextMenu({ target: aTextbox, json: json });
         ]]></body>
       </method>
     </implementation>
     <handlers>
       <handler event="click" phase="capturing">
         <![CDATA[
           if (event.mozInputSource == Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH) {
-            SelectionHelperUI.attachEditSession(ChromeSelectionHandler,
-                                                event.clientX, event.clientY);
+            if (typeof SelectionHelperUI != 'undefined') {
+              SelectionHelperUI.attachEditSession(ChromeSelectionHandler,
+                                                  event.clientX, event.clientY);
+            } else {
+              // If we don't have access to SelectionHelperUI then we are using this
+              // binding for browser content (e.g. about:config)
+              Services.obs.notifyObservers(event, "attach_edit_session_to_content", "");
+            }
           }
         ]]>
       </handler>
     </handlers>
   </binding>
 </bindings>
--- a/browser/metro/base/content/browser-ui.js
+++ b/browser/metro/base/content/browser-ui.js
@@ -107,16 +107,17 @@ var BrowserUI = {
     // Init core UI modules
     ContextUI.init();
     PanelUI.init();
     FlyoutPanelsUI.init();
     PageThumbs.init();
     NewTabUtils.init();
     SettingsCharm.init();
     NavButtonSlider.init();
+    SelectionHelperUI.init();
 
     // We can delay some initialization until after startup.  We wait until
     // the first page is shown, then dispatch a UIReadyDelayed event.
     messageManager.addMessageListener("pageshow", function onPageShow() {
       if (getBrowser().currentURI.spec == "about:blank")
         return;
 
       messageManager.removeMessageListener("pageshow", onPageShow);
--- a/browser/metro/base/content/config.js
+++ b/browser/metro/base/content/config.js
@@ -2,38 +2,45 @@
  * 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/. */
 
 let Ci = Components.interfaces;
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 var ViewConfig = {
+  get _main() {
+    delete this._main;
+    return this._main = document.getElementById("main-container");
+  },
+
   get _container() {
     delete this._container;
     return this._container = document.getElementById("prefs-container");
   },
 
   get _editor() {
     delete this._editor;
     return this._editor = document.getElementById("editor");
   },
 
   init: function init() {
+    this._main.addEventListener("click", this, false);
     window.addEventListener("resize", this, false);
     window.addEventListener("prefchange", this, false);
     window.addEventListener("prefnew", this, false);
 
     this._handleWindowResize();
     this.filter("");
 
     document.getElementById("textbox").focus();
   },
 
   uninit: function uninit() {
+    this._main.removeEventListener("click", this, false);
     window.removeEventListener("resize", this, false);
     window.removeEventListener("prefchange", this, false);
     window.removeEventListener("prefnew", this, false);
   },
 
   filter: function filter(aValue) {
     let row = document.getElementById("editor-row");
 
@@ -163,27 +170,37 @@ var ViewConfig = {
       case "resize":
         this._handleWindowResize();
         break;
 
       case "prefchange":
       case "prefnew":
         this._handlePrefChange(aEvent.detail, aEvent.type == "prefnew");
         break;
+
+      case "click":
+        this._onClick();
+        break;
     }
   },
 
   _handleWindowResize: function _handleWindowResize() {
     let mainBox = document.getElementById("main-container");
     let textbox = document.getElementById("textbox");
     let height = window.innerHeight - textbox.getBoundingClientRect().height;
 
     mainBox.setAttribute("height", height);
   },
 
+  _onClick: function () {
+    // Blur the search box when tapping anywhere else in the content
+    // in order to close the soft keyboard.
+    document.getElementById("textbox").blur();
+  },
+
   _handlePrefChange: function _handlePrefChange(aIndex, aNew) {
     let isEditing = !this._editor.hidden;
     let shouldUpdateEditor = false;
     if (isEditing) {
       let setting = document.getElementById("editor-setting");
       let editorIndex = Utils.getPrefIndex(setting.getAttribute("pref"));
       shouldUpdateEditor = (aIndex == editorIndex);
       if(shouldUpdateEditor || aIndex > editorIndex)
--- a/browser/metro/base/content/contenthandlers/Content.js
+++ b/browser/metro/base/content/contenthandlers/Content.js
@@ -179,16 +179,22 @@ let Content = {
         // the autocomplete.  Perhaps the user used backspace or delete.
         if (!aEvent.target.value)
           this.formAssistant.close();
         else
           this.formAssistant.open(aEvent.target);
         break;
 
       case "click":
+        // Workaround for bug 925457: we sometimes don't recognize the
+        // correct tap target or are unable to identify if it's editable.
+        // Instead always save tap co-ordinates for the keyboard to look for
+        // when it is up.
+        SelectionHandler.onClickCoords(aEvent.clientX, aEvent.clientY);
+
         if (aEvent.eventPhase == aEvent.BUBBLING_PHASE)
           this._onClickBubble(aEvent);
         else
           this._onClickCapture(aEvent);
         break;
 
       case "DOMFormHasPassword":
         LoginManagerContent.onFormPassword(aEvent);
--- a/browser/metro/base/content/contenthandlers/SelectionHandler.js
+++ b/browser/metro/base/content/contenthandlers/SelectionHandler.js
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 dump("### SelectionHandler.js loaded\n");
 
 var SelectionHandler = {
   init: function init() {
     this.type = kContentSelector;
     this.snap = true;
+    this.lastYPos = this.lastXPos = null;
     addMessageListener("Browser:SelectionStart", this);
     addMessageListener("Browser:SelectionAttach", this);
     addMessageListener("Browser:SelectionEnd", this);
     addMessageListener("Browser:SelectionMoveStart", this);
     addMessageListener("Browser:SelectionMove", this);
     addMessageListener("Browser:SelectionMoveEnd", this);
     addMessageListener("Browser:SelectionUpdate", this);
     addMessageListener("Browser:SelectionClose", this);
@@ -335,16 +336,21 @@ var SelectionHandler = {
       raiseContent: result,
     });
   },
 
   _onPing: function _onPing(aId) {
     this.sendAsync("Content:SelectionHandlerPong", { id: aId });
   },
 
+  onClickCoords: function (xPos, yPos) {
+    this.lastXPos = xPos;
+    this.lastYPos = yPos;
+  },
+
   /*************************************************
    * Selection helpers
    */
 
   /*
    * _clearSelection
    *
    * Clear existing selection if it exists and reset our internla state.
@@ -407,19 +413,22 @@ var SelectionHandler = {
    * keyboard.
    *
    * @param aNewViewHeight the new content view height
    * @return 0 if no positioning is required or a positive val equal to the
    * distance content should be raised to center the target element.
    */
   _calcNewContentPosition: function _calcNewContentPosition(aNewViewHeight) {
     // We have no target element but the keyboard is up
-    // so lets not cover content
+    // so lets not cover content that is below the keyboard
     if (!this._cache || !this._cache.element) {
-      return Services.metro.keyboardHeight;
+      if (this.lastYPos != null && this.lastYPos > aNewViewHeight) {
+        return Services.metro.keyboardHeight;
+      }
+      return 0;
     }
 
     let position = Util.centerElementInView(aNewViewHeight, this._cache.element);
     if (position !== undefined) {
       return position;
     }
 
     // Special case: we are dealing with an input that is taller than the
@@ -518,17 +527,22 @@ var SelectionHandler = {
         this._onSelectionDebug(json);
         break;
 
       case "Browser:SelectionUpdate":
         this._onSelectionUpdate();
         break;
 
       case "Browser:RepositionInfoRequest":
-        this._repositionInfoRequest(json);
+        // This message is sent simultaneously with a tap event.
+        // Wait a bit to make sure we have the most up-to-date tap co-ordinates
+        // before a call to _calcNewContentPosition() which accesses them.
+        content.setTimeout (function () {
+          SelectionHandler._repositionInfoRequest(json);
+        }, 50);
         break;
 
       case "Browser:SelectionHandlerPing":
         this._onPing(json.id);
         break;
     }
   },
 
--- a/browser/metro/base/content/helperui/SelectionHelperUI.js
+++ b/browser/metro/base/content/helperui/SelectionHelperUI.js
@@ -339,16 +339,31 @@ var SelectionHelperUI = {
       return false;
     if ((this._caretMark && this._caretMark.dragging) ||
         (this._startMark && this._startMark.dragging) ||
         (this._endMark && this._endMark.dragging))
       return true;
     return false;
   },
 
+
+  /*
+   * Observers
+   */
+
+  observe: function (aSubject, aTopic, aData) {
+  switch (aTopic) {
+    case "attach_edit_session_to_content":
+      let event = aSubject;
+      SelectionHelperUI.attachEditSession(Browser.selectedTab.browser,
+                                          event.clientX, event.clientY);
+      break;
+    }
+  },
+
   /*
    * Public apis
    */
 
   /*
    * pingSelectionHandler
    * 
    * Ping the SelectionHandler and wait for the right response. Insures
@@ -490,16 +505,20 @@ var SelectionHelperUI = {
       clearSelection: clearSelection
     });
   },
 
   /*
    * Init and shutdown
    */
 
+  init: function () {
+    Services.obs.addObserver(this, "attach_edit_session_to_content", false);
+  },
+
   _init: function _init(aMsgTarget) {
     // store the target message manager
     this._msgTarget = aMsgTarget;
 
     // Init our list of available monocle ids
     this._setupMonocleIdArray();
 
     // Init selection rect info
--- a/browser/metro/locales/import/Makefile.in
+++ b/browser/metro/locales/import/Makefile.in
@@ -25,19 +25,21 @@ include $(topsrcdir)/config/rules.mk
 libs::
 	$(MAKE) -C $(DEPTH)/browser/locales searchplugins \
 	  DIST_SUBDIR=$(DIST_SUBDIR) XPI_ROOT_APPID="$(XPI_ROOT_APPID)"
 
 #########################################
 # Bookmarks
 
 # Pick up desktop's bookmarks.inc file
+ifdef LOCALE_MERGEDIR
+vpath book%.inc $(LOCALE_MERGEDIR)/browser/profile
+endif
 vpath book%.inc $(LOCALE_SRCDIR)/profile
 ifdef LOCALE_MERGEDIR
-vpath book%.inc $(LOCALE_SRCDIR)/profile
 vpath book%.inc @top_srcdir@/$(relativesrcdir)/en-US/profile
 endif
 
 bookmarks-src = $(srcdir)/../generic/profile/bookmarks.json.in
 
 # The resulting bookmarks.json will get picked up and packaged by the
 # processing of the jar file in the parent directory.
 bookmarks: bookmarks.inc
--- a/mobile/android/components/HelperAppDialog.js
+++ b/mobile/android/components/HelperAppDialog.js
@@ -29,42 +29,102 @@ HelperAppLauncherDialog.prototype = {
     let defaultHandler = new Object();
     let apps = HelperApps.getAppsForUri(aLauncher.source, {
       mimeType: aLauncher.MIMEInfo.MIMEType,
     });
 
     // Add a fake intent for save to disk at the top of the list
     apps.unshift({
       name: bundle.GetStringFromName("helperapps.saveToDisk"),
+      packageName: "org.mozilla.gecko.Download",
       iconUri: "drawable://icon",
       launch: function() {
         // Reset the preferredAction here
         aLauncher.MIMEInfo.preferredAction = Ci.nsIMIMEInfo.saveToDisk;
         aLauncher.saveToDisk(null, false);
         return true;
       }
     });
 
-    let app = apps[0];
-    if (apps.length > 1) {
-      app = HelperApps.prompt(apps, {
-        title: bundle.GetStringFromName("helperapps.pick")
+    // See if the user already marked something as the default for this mimetype,
+    // and if that app is still installed.
+    let preferredApp = this._getPreferredApp(aLauncher);
+    if (preferredApp) {
+      let pref = apps.filter(function(app) {
+        return app.packageName === preferredApp;
       });
+
+      if (pref.length > 0) {
+        pref[0].launch(aLauncher.source);
+        return;
+      }
+    }
+
+    let callback = function(app) {
+      aLauncher.MIMEInfo.preferredAction = Ci.nsIMIMEInfo.useHelperApp;
+      app.launch(aLauncher.source);
+      if (!app.launch(aLauncher.source)) {
+        aLauncher.cancel(Cr.NS_BINDING_ABORTED);
+      }
     }
 
-    if (app) {
-      aLauncher.MIMEInfo.preferredAction = Ci.nsIMIMEInfo.useHelperApp;
-      if (!app.launch(aLauncher.source)) {
-        aLauncher.cancel();
-      }
+    if (apps.length > 1) {
+      HelperApps.prompt(apps, {
+        title: bundle.GetStringFromName("helperapps.pick"),
+        buttons: [
+          bundle.GetStringFromName("helperapps.alwaysUse"),
+          bundle.GetStringFromName("helperapps.useJustOnce")
+        ]
+      }, (data) => {
+        if (data.button < 0)
+          return;
+
+        callback(apps[data.icongrid0]);
+
+        if (data.button == 0)
+          this._setPreferredApp(aLauncher, apps[data.icongrid0]);
+      });
     } else {
-      // Something weird happened. Log an error
-      Services.console.logStringMessage("Unexpected selection from grid: " + app);
+      callback(apps[0]);
     }
+  },
 
+  _getPrefName: function getPrefName(mimetype) {
+    return "browser.download.preferred." + mimetype.replace("\\", ".");
+  },
+
+  _getMimeTypeFromLauncher: function getMimeTypeFromLauncher(launcher) {
+    let mime = launcher.MIMEInfo.MIMEType;
+    if (!mime)
+      mime = ContentAreaUtils.getMIMETypeForURI(launcher.source) || "";
+    return mime;
+  },
+
+  _getPreferredApp: function getPreferredApp(launcher) {
+    let mime = this._getMimeTypeFromLauncher(launcher);
+    if (!mime)
+      return;
+
+    try {
+      return Services.prefs.getCharPref(this._getPrefName(mime));
+    } catch(ex) {
+      Services.console.logStringMessage("Error getting pref for " + mime + " " + ex);
+    }
+    return null;
+  },
+
+  _setPreferredApp: function setPreferredApp(launcher, app) {
+    let mime = this._getMimeTypeFromLauncher(launcher);
+    if (!mime)
+      return;
+
+    if (app)
+      Services.prefs.setCharPref(this._getPrefName(mime), app.packageName);
+    else
+      Services.prefs.clearUserPref(this._getPrefName(mime));
   },
 
   promptForSaveToFile: function hald_promptForSaveToFile(aLauncher, aContext, aDefaultFile, aSuggestedFileExt, aForcePrompt) {
     // Retrieve the user's default download directory
     let dnldMgr = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
     let defaultFolder = dnldMgr.userDownloadsDirectory;
 
     try {
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -260,16 +260,18 @@ 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
 helperapps.always=Always
 helperapps.never=Never
 helperapps.pick=Complete action using
 helperapps.saveToDisk=Download
+helperapps.alwaysUse=Always
+helperapps.useJustOnce=Just once
 
 #Lightweight themes
 # LOCALIZATION NOTE (lwthemeInstallRequest.message): %S will be replaced with
 # the host name of the site.
 lwthemeInstallRequest.message=This site (%S) attempted to install a theme.
 lwthemeInstallRequest.allowButton=Allow
 
 # LOCALIZATION NOTE (getUserMedia.shareCamera.message, getUserMedia.shareMicrophone.message, getUserMedia.shareCameraAndMicrophone.message, getUserMedia.sharingCamera.message, getUserMedia.sharingMicrophone.message, getUserMedia.sharingCameraAndMicrophone.message): %S is the website origin (e.g. www.mozilla.org)
deleted file mode 100644
deleted file mode 100644
deleted file mode 100644
--- a/mobile/android/services/android-drawable-mdpi-resources.mn
+++ /dev/null
@@ -1,2 +0,0 @@
-mobile/android/base/resources/drawable-mdpi/sync_desktop.png
-mobile/android/base/resources/drawable-mdpi/sync_mobile.png
deleted file mode 100644
--- a/mobile/android/services/android-drawable-resources.mn
+++ /dev/null
@@ -1,1 +0,0 @@
-mobile/android/base/resources/drawable/sync_pin_background.xml
deleted file mode 100644
--- a/mobile/android/services/android-layout-resources.mn
+++ /dev/null
@@ -1,11 +0,0 @@
-res/layout/sync_account.xml
-res/layout/sync_list_item.xml
-res/layout/sync_redirect_to_setup.xml
-res/layout/sync_send_tab.xml
-res/layout/sync_setup.xml
-res/layout/sync_setup_failure.xml
-res/layout/sync_setup_jpake_waiting.xml
-res/layout/sync_setup_nointernet.xml
-res/layout/sync_setup_pair.xml
-res/layout/sync_setup_success.xml
-res/layout/sync_setup_webview.xml
deleted file mode 100644
--- a/mobile/android/services/android-values-resources.mn
+++ /dev/null
@@ -1,1 +0,0 @@
-res/values-large-v11/sync_styles.xml 
deleted file mode 100644
--- a/mobile/android/services/java-sources.mn
+++ /dev/null
@@ -1,289 +0,0 @@
-background/announcements/Announcement.java
-background/announcements/AnnouncementPresenter.java
-background/announcements/AnnouncementsBroadcastReceiver.java
-background/announcements/AnnouncementsBroadcastService.java
-background/announcements/AnnouncementsFetchDelegate.java
-background/announcements/AnnouncementsFetcher.java
-background/announcements/AnnouncementsFetchResourceDelegate.java
-background/announcements/AnnouncementsService.java
-background/BackgroundService.java
-background/bagheera/BagheeraClient.java
-background/bagheera/BagheeraRequestDelegate.java
-background/bagheera/BoundedByteArrayEntity.java
-background/bagheera/DeflateHelper.java
-background/common/DateUtils.java
-background/common/log/Logger.java
-background/common/log/writers/AndroidLevelCachingLogWriter.java
-background/common/log/writers/AndroidLogWriter.java
-background/common/log/writers/LevelFilteringLogWriter.java
-background/common/log/writers/LogWriter.java
-background/common/log/writers/PrintLogWriter.java
-background/common/log/writers/SimpleTagLogWriter.java
-background/common/log/writers/StringLogWriter.java
-background/common/log/writers/TagLogWriter.java
-background/common/log/writers/ThreadLocalTagLogWriter.java
-background/datareporting/TelemetryRecorder.java
-background/db/CursorDumper.java
-background/db/Tab.java
-background/healthreport/Environment.java
-background/healthreport/EnvironmentBuilder.java
-background/healthreport/EnvironmentV1.java
-background/healthreport/HealthReportBroadcastReceiver.java
-background/healthreport/HealthReportBroadcastService.java
-background/healthreport/HealthReportDatabases.java
-background/healthreport/HealthReportDatabaseStorage.java
-background/healthreport/HealthReportGenerator.java
-background/healthreport/HealthReportProvider.java
-background/healthreport/HealthReportStorage.java
-background/healthreport/HealthReportUtils.java
-background/healthreport/ProfileInformationCache.java
-background/healthreport/prune/HealthReportPruneService.java
-background/healthreport/prune/PrunePolicy.java
-background/healthreport/prune/PrunePolicyDatabaseStorage.java
-background/healthreport/prune/PrunePolicyStorage.java
-background/healthreport/upload/AndroidSubmissionClient.java
-background/healthreport/upload/HealthReportUploadService.java
-background/healthreport/upload/ObsoleteDocumentTracker.java
-background/healthreport/upload/SubmissionClient.java
-background/healthreport/upload/SubmissionPolicy.java
-sync/AlreadySyncingException.java
-sync/CollectionKeys.java
-sync/CommandProcessor.java
-sync/CommandRunner.java
-sync/config/AccountPickler.java
-sync/config/activities/SelectEnginesActivity.java
-sync/config/ClientRecordTerminator.java
-sync/config/ConfigurationMigrator.java
-sync/CredentialException.java
-sync/CredentialsSource.java
-sync/crypto/CryptoException.java
-sync/crypto/CryptoInfo.java
-sync/crypto/HKDF.java
-sync/crypto/HMACVerificationException.java
-sync/crypto/KeyBundle.java
-sync/crypto/MissingCryptoInputException.java
-sync/crypto/NoKeyBundleException.java
-sync/crypto/PersistedCrypto5Keys.java
-sync/CryptoRecord.java
-sync/DelayedWorkTracker.java
-sync/delegates/ClientsDataDelegate.java
-sync/delegates/FreshStartDelegate.java
-sync/delegates/GlobalSessionCallback.java
-sync/delegates/JSONRecordFetchDelegate.java
-sync/delegates/KeyUploadDelegate.java
-sync/delegates/MetaGlobalDelegate.java
-sync/delegates/WipeServerDelegate.java
-sync/EngineSettings.java
-sync/ExtendedJSONObject.java
-sync/GlobalSession.java
-sync/HTTPFailureException.java
-sync/InfoCollections.java
-sync/InfoCounts.java
-sync/jpake/BigIntegerHelper.java
-sync/jpake/Gx3OrGx4IsZeroOrOneException.java
-sync/jpake/IncorrectZkpException.java
-sync/jpake/JPakeClient.java
-sync/jpake/JPakeCrypto.java
-sync/jpake/JPakeJson.java
-sync/jpake/JPakeNoActivePairingException.java
-sync/jpake/JPakeNumGenerator.java
-sync/jpake/JPakeNumGeneratorRandom.java
-sync/jpake/JPakeParty.java
-sync/jpake/stage/CompleteStage.java
-sync/jpake/stage/ComputeFinalStage.java
-sync/jpake/stage/ComputeKeyVerificationStage.java
-sync/jpake/stage/ComputeStepOneStage.java
-sync/jpake/stage/ComputeStepTwoStage.java
-sync/jpake/stage/DecryptDataStage.java
-sync/jpake/stage/DeleteChannel.java
-sync/jpake/stage/GetChannelStage.java
-sync/jpake/stage/GetRequestStage.java
-sync/jpake/stage/JPakeStage.java
-sync/jpake/stage/PutRequestStage.java
-sync/jpake/stage/VerifyPairingStage.java
-sync/jpake/Zkp.java
-sync/JSONRecordFetcher.java
-sync/KeyBundleProvider.java
-sync/MetaGlobal.java
-sync/MetaGlobalException.java
-sync/MetaGlobalMissingEnginesException.java
-sync/MetaGlobalNotSetException.java
-sync/middleware/Crypto5MiddlewareRepository.java
-sync/middleware/Crypto5MiddlewareRepositorySession.java
-sync/middleware/MiddlewareRepository.java
-sync/middleware/MiddlewareRepositorySession.java
-sync/net/AuthHeaderProvider.java
-sync/net/BaseResource.java
-sync/net/BaseResourceDelegate.java
-sync/net/BasicAuthHeaderProvider.java
-sync/net/BrowserIDAuthHeaderProvider.java
-sync/net/ConnectionMonitorThread.java
-sync/net/HandleProgressException.java
-sync/net/HawkAuthHeaderProvider.java
-sync/net/HMACAuthHeaderProvider.java
-sync/net/HttpResponseObserver.java
-sync/net/Resource.java
-sync/net/ResourceDelegate.java
-sync/net/SyncResponse.java
-sync/net/SyncStorageCollectionRequest.java
-sync/net/SyncStorageCollectionRequestDelegate.java
-sync/net/SyncStorageRecordRequest.java
-sync/net/SyncStorageRequest.java
-sync/net/SyncStorageRequestDelegate.java
-sync/net/SyncStorageRequestIncrementalDelegate.java
-sync/net/SyncStorageResponse.java
-sync/net/TLSSocketFactory.java
-sync/net/WBOCollectionRequestDelegate.java
-sync/net/WBORequestDelegate.java
-sync/NoCollectionKeysSetException.java
-sync/NodeAuthenticationException.java
-sync/NonArrayJSONException.java
-sync/NonObjectJSONException.java
-sync/NullClusterURLException.java
-sync/PersistedMetaGlobal.java
-sync/PrefsSource.java
-sync/receivers/SyncAccountDeletedReceiver.java
-sync/receivers/SyncAccountDeletedService.java
-sync/receivers/UpgradeReceiver.java
-sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java
-sync/repositories/android/AndroidBrowserBookmarksRepository.java
-sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java
-sync/repositories/android/AndroidBrowserHistoryDataAccessor.java
-sync/repositories/android/AndroidBrowserHistoryDataExtender.java
-sync/repositories/android/AndroidBrowserHistoryRepository.java
-sync/repositories/android/AndroidBrowserHistoryRepositorySession.java
-sync/repositories/android/AndroidBrowserRepository.java
-sync/repositories/android/AndroidBrowserRepositoryDataAccessor.java
-sync/repositories/android/AndroidBrowserRepositorySession.java
-sync/repositories/android/BookmarksDeletionManager.java
-sync/repositories/android/BookmarksInsertionManager.java
-sync/repositories/android/BrowserContractHelpers.java
-sync/repositories/android/CachedSQLiteOpenHelper.java
-sync/repositories/android/ClientsDatabase.java
-sync/repositories/android/ClientsDatabaseAccessor.java
-sync/repositories/android/FennecTabsRepository.java
-sync/repositories/android/FormHistoryRepositorySession.java
-sync/repositories/android/PasswordsRepositorySession.java
-sync/repositories/android/RepoUtils.java
-sync/repositories/BookmarkNeedsReparentingException.java
-sync/repositories/BookmarksRepository.java
-sync/repositories/ConstrainedServer11Repository.java
-sync/repositories/delegates/DeferrableRepositorySessionCreationDelegate.java
-sync/repositories/delegates/DeferredRepositorySessionBeginDelegate.java
-sync/repositories/delegates/DeferredRepositorySessionFetchRecordsDelegate.java
-sync/repositories/delegates/DeferredRepositorySessionFinishDelegate.java
-sync/repositories/delegates/DeferredRepositorySessionStoreDelegate.java
-sync/repositories/delegates/RepositorySessionBeginDelegate.java
-sync/repositories/delegates/RepositorySessionCleanDelegate.java
-sync/repositories/delegates/RepositorySessionCreationDelegate.java
-sync/repositories/delegates/RepositorySessionFetchRecordsDelegate.java
-sync/repositories/delegates/RepositorySessionFinishDelegate.java
-sync/repositories/delegates/RepositorySessionGuidsSinceDelegate.java
-sync/repositories/delegates/RepositorySessionStoreDelegate.java
-sync/repositories/delegates/RepositorySessionWipeDelegate.java
-sync/repositories/domain/BookmarkRecord.java
-sync/repositories/domain/BookmarkRecordFactory.java
-sync/repositories/domain/ClientRecord.java
-sync/repositories/domain/ClientRecordFactory.java
-sync/repositories/domain/FormHistoryRecord.java
-sync/repositories/domain/HistoryRecord.java
-sync/repositories/domain/HistoryRecordFactory.java
-sync/repositories/domain/PasswordRecord.java
-sync/repositories/domain/Record.java
-sync/repositories/domain/RecordParseException.java
-sync/repositories/domain/TabsRecord.java
-sync/repositories/domain/VersionConstants.java
-sync/repositories/FetchFailedException.java
-sync/repositories/HashSetStoreTracker.java
-sync/repositories/HistoryRepository.java
-sync/repositories/IdentityRecordFactory.java
-sync/repositories/InactiveSessionException.java
-sync/repositories/InvalidBookmarkTypeException.java
-sync/repositories/InvalidRequestException.java
-sync/repositories/InvalidSessionTransitionException.java
-sync/repositories/MultipleRecordsForGuidException.java
-sync/repositories/NoContentProviderException.java
-sync/repositories/NoGuidForIdException.java
-sync/repositories/NoStoreDelegateException.java
-sync/repositories/NullCursorException.java
-sync/repositories/ParentNotFoundException.java
-sync/repositories/ProfileDatabaseException.java
-sync/repositories/RecordFactory.java
-sync/repositories/RecordFilter.java
-sync/repositories/Repository.java
-sync/repositories/RepositorySession.java
-sync/repositories/RepositorySessionBundle.java
-sync/repositories/Server11Repository.java
-sync/repositories/Server11RepositorySession.java
-sync/repositories/StoreFailedException.java
-sync/repositories/StoreTracker.java
-sync/repositories/StoreTrackingRepositorySession.java
-sync/Server11PreviousPostFailedException.java
-sync/Server11RecordPostFailedException.java
-sync/setup/activities/AccountActivity.java
-sync/setup/activities/ActivityUtils.java
-sync/setup/activities/ClientRecordArrayAdapter.java
-sync/setup/activities/RedirectToSetupActivity.java
-sync/setup/activities/SendTabActivity.java
-sync/setup/activities/SendTabData.java
-sync/setup/activities/SetupFailureActivity.java
-sync/setup/activities/SetupSuccessActivity.java
-sync/setup/activities/SetupSyncActivity.java
-sync/setup/activities/SyncActivity.java
-sync/setup/activities/WebURLFinder.java
-sync/setup/activities/WebViewActivity.java
-sync/setup/auth/AccountAuthenticator.java
-sync/setup/auth/AuthenticateAccountStage.java
-sync/setup/auth/AuthenticationResult.java
-sync/setup/auth/AuthenticatorStage.java
-sync/setup/auth/EnsureUserExistenceStage.java
-sync/setup/auth/FetchUserNodeStage.java
-sync/setup/Constants.java
-sync/setup/InvalidSyncKeyException.java
-sync/setup/SyncAccounts.java
-sync/setup/SyncAuthenticatorService.java
-sync/stage/AbstractNonRepositorySyncStage.java
-sync/stage/AbstractSessionManagingSyncStage.java
-sync/stage/AndroidBrowserBookmarksServerSyncStage.java
-sync/stage/AndroidBrowserHistoryServerSyncStage.java
-sync/stage/CheckPreconditionsStage.java
-sync/stage/CompletedStage.java
-sync/stage/EnsureClusterURLStage.java
-sync/stage/EnsureCrypto5KeysStage.java
-sync/stage/FennecTabsServerSyncStage.java
-sync/stage/FetchInfoCollectionsStage.java
-sync/stage/FetchMetaGlobalStage.java
-sync/stage/FormHistoryServerSyncStage.java
-sync/stage/GlobalSyncStage.java
-sync/stage/NoSuchStageException.java
-sync/stage/NoSyncIDException.java
-sync/stage/PasswordsServerSyncStage.java
-sync/stage/SafeConstrainedServer11Repository.java
-sync/stage/ServerSyncStage.java
-sync/stage/SyncClientsEngineStage.java
-sync/stage/UploadMetaGlobalStage.java
-sync/syncadapter/SyncAdapter.java
-sync/syncadapter/SyncService.java
-sync/SyncConfiguration.java
-sync/SyncConfigurationException.java
-sync/SyncException.java
-sync/synchronizer/ConcurrentRecordConsumer.java
-sync/synchronizer/RecordConsumer.java
-sync/synchronizer/RecordsChannel.java
-sync/synchronizer/RecordsChannelDelegate.java
-sync/synchronizer/RecordsConsumerDelegate.java
-sync/synchronizer/SerialRecordConsumer.java
-sync/synchronizer/ServerLocalSynchronizer.java
-sync/synchronizer/ServerLocalSynchronizerSession.java
-sync/synchronizer/SessionNotBegunException.java
-sync/synchronizer/Synchronizer.java
-sync/synchronizer/SynchronizerDelegate.java
-sync/synchronizer/SynchronizerSession.java
-sync/synchronizer/SynchronizerSessionDelegate.java
-sync/synchronizer/UnbundleError.java
-sync/synchronizer/UnexpectedSessionException.java
-sync/SynchronizerConfiguration.java
-sync/ThreadPool.java
-sync/UnexpectedJSONException.java
-sync/UnknownSynchronizerConfigurationVersionException.java
-sync/Utils.java
deleted file mode 100644
--- a/mobile/android/services/java-third-party-sources.mn
+++ /dev/null
@@ -1,464 +0,0 @@
-ch/boye/httpclientandroidlib/androidextra/HttpClientAndroidLog.java
-ch/boye/httpclientandroidlib/annotation/GuardedBy.java
-ch/boye/httpclientandroidlib/annotation/Immutable.java
-ch/boye/httpclientandroidlib/annotation/NotThreadSafe.java
-ch/boye/httpclientandroidlib/annotation/ThreadSafe.java
-ch/boye/httpclientandroidlib/auth/AUTH.java
-ch/boye/httpclientandroidlib/auth/AuthenticationException.java
-ch/boye/httpclientandroidlib/auth/AuthScheme.java
-ch/boye/httpclientandroidlib/auth/AuthSchemeFactory.java
-ch/boye/httpclientandroidlib/auth/AuthSchemeRegistry.java
-ch/boye/httpclientandroidlib/auth/AuthScope.java
-ch/boye/httpclientandroidlib/auth/AuthState.java
-ch/boye/httpclientandroidlib/auth/BasicUserPrincipal.java
-ch/boye/httpclientandroidlib/auth/ContextAwareAuthScheme.java
-ch/boye/httpclientandroidlib/auth/Credentials.java
-ch/boye/httpclientandroidlib/auth/InvalidCredentialsException.java
-ch/boye/httpclientandroidlib/auth/MalformedChallengeException.java
-ch/boye/httpclientandroidlib/auth/NTCredentials.java
-ch/boye/httpclientandroidlib/auth/NTUserPrincipal.java
-ch/boye/httpclientandroidlib/auth/params/AuthParamBean.java
-ch/boye/httpclientandroidlib/auth/params/AuthParams.java
-ch/boye/httpclientandroidlib/auth/params/AuthPNames.java
-ch/boye/httpclientandroidlib/auth/UsernamePasswordCredentials.java
-ch/boye/httpclientandroidlib/client/AuthCache.java
-ch/boye/httpclientandroidlib/client/AuthenticationHandler.java
-ch/boye/httpclientandroidlib/client/CircularRedirectException.java
-ch/boye/httpclientandroidlib/client/ClientProtocolException.java
-ch/boye/httpclientandroidlib/client/CookieStore.java
-ch/boye/httpclientandroidlib/client/CredentialsProvider.java
-ch/boye/httpclientandroidlib/client/entity/DecompressingEntity.java
-ch/boye/httpclientandroidlib/client/entity/DeflateDecompressingEntity.java
-ch/boye/httpclientandroidlib/client/entity/GzipDecompressingEntity.java
-ch/boye/httpclientandroidlib/client/entity/UrlEncodedFormEntity.java
-ch/boye/httpclientandroidlib/client/HttpClient.java
-ch/boye/httpclientandroidlib/client/HttpRequestRetryHandler.java
-ch/boye/httpclientandroidlib/client/HttpResponseException.java
-ch/boye/httpclientandroidlib/client/methods/AbortableHttpRequest.java
-ch/boye/httpclientandroidlib/client/methods/HttpDelete.java
-ch/boye/httpclientandroidlib/client/methods/HttpEntityEnclosingRequestBase.java
-ch/boye/httpclientandroidlib/client/methods/HttpGet.java
-ch/boye/httpclientandroidlib/client/methods/HttpHead.java
-ch/boye/httpclientandroidlib/client/methods/HttpOptions.java
-ch/boye/httpclientandroidlib/client/methods/HttpPost.java
-ch/boye/httpclientandroidlib/client/methods/HttpPut.java
-ch/boye/httpclientandroidlib/client/methods/HttpRequestBase.java
-ch/boye/httpclientandroidlib/client/methods/HttpTrace.java
-ch/boye/httpclientandroidlib/client/methods/HttpUriRequest.java
-ch/boye/httpclientandroidlib/client/NonRepeatableRequestException.java
-ch/boye/httpclientandroidlib/client/params/AllClientPNames.java
-ch/boye/httpclientandroidlib/client/params/AuthPolicy.java
-ch/boye/httpclientandroidlib/client/params/ClientParamBean.java
-ch/boye/httpclientandroidlib/client/params/ClientPNames.java
-ch/boye/httpclientandroidlib/client/params/CookiePolicy.java
-ch/boye/httpclientandroidlib/client/params/HttpClientParams.java
-ch/boye/httpclientandroidlib/client/protocol/ClientContext.java
-ch/boye/httpclientandroidlib/client/protocol/ClientContextConfigurer.java
-ch/boye/httpclientandroidlib/client/protocol/RequestAcceptEncoding.java
-ch/boye/httpclientandroidlib/client/protocol/RequestAddCookies.java
-ch/boye/httpclientandroidlib/client/protocol/RequestAuthCache.java
-ch/boye/httpclientandroidlib/client/protocol/RequestClientConnControl.java
-ch/boye/httpclientandroidlib/client/protocol/RequestDefaultHeaders.java
-ch/boye/httpclientandroidlib/client/protocol/RequestProxyAuthentication.java
-ch/boye/httpclientandroidlib/client/protocol/RequestTargetAuthentication.java
-ch/boye/httpclientandroidlib/client/protocol/ResponseAuthCache.java
-ch/boye/httpclientandroidlib/client/protocol/ResponseContentEncoding.java
-ch/boye/httpclientandroidlib/client/protocol/ResponseProcessCookies.java
-ch/boye/httpclientandroidlib/client/RedirectException.java
-ch/boye/httpclientandroidlib/client/RedirectHandler.java
-ch/boye/httpclientandroidlib/client/RedirectStrategy.java
-ch/boye/httpclientandroidlib/client/RequestDirector.java
-ch/boye/httpclientandroidlib/client/ResponseHandler.java
-ch/boye/httpclientandroidlib/client/UserTokenHandler.java
-ch/boye/httpclientandroidlib/client/utils/CloneUtils.java
-ch/boye/httpclientandroidlib/client/utils/Idn.java
-ch/boye/httpclientandroidlib/client/utils/JdkIdn.java
-ch/boye/httpclientandroidlib/client/utils/Punycode.java
-ch/boye/httpclientandroidlib/client/utils/Rfc3492Idn.java
-ch/boye/httpclientandroidlib/client/utils/URIUtils.java
-ch/boye/httpclientandroidlib/client/utils/URLEncodedUtils.java
-ch/boye/httpclientandroidlib/conn/BasicEofSensorWatcher.java
-ch/boye/httpclientandroidlib/conn/BasicManagedEntity.java
-ch/boye/httpclientandroidlib/conn/ClientConnectionManager.java
-ch/boye/httpclientandroidlib/conn/ClientConnectionManagerFactory.java
-ch/boye/httpclientandroidlib/conn/ClientConnectionOperator.java
-ch/boye/httpclientandroidlib/conn/ClientConnectionRequest.java
-ch/boye/httpclientandroidlib/conn/ConnectionKeepAliveStrategy.java
-ch/boye/httpclientandroidlib/conn/ConnectionPoolTimeoutException.java
-ch/boye/httpclientandroidlib/conn/ConnectionReleaseTrigger.java
-ch/boye/httpclientandroidlib/conn/ConnectTimeoutException.java
-ch/boye/httpclientandroidlib/conn/EofSensorInputStream.java
-ch/boye/httpclientandroidlib/conn/EofSensorWatcher.java
-ch/boye/httpclientandroidlib/conn/HttpHostConnectException.java
-ch/boye/httpclientandroidlib/conn/HttpRoutedConnection.java
-ch/boye/httpclientandroidlib/conn/ManagedClientConnection.java
-ch/boye/httpclientandroidlib/conn/MultihomePlainSocketFactory.java
-ch/boye/httpclientandroidlib/conn/OperatedClientConnection.java
-ch/boye/httpclientandroidlib/conn/params/ConnConnectionParamBean.java
-ch/boye/httpclientandroidlib/conn/params/ConnConnectionPNames.java
-ch/boye/httpclientandroidlib/conn/params/ConnManagerParamBean.java
-ch/boye/httpclientandroidlib/conn/params/ConnManagerParams.java
-ch/boye/httpclientandroidlib/conn/params/ConnManagerPNames.java
-ch/boye/httpclientandroidlib/conn/params/ConnPerRoute.java
-ch/boye/httpclientandroidlib/conn/params/ConnPerRouteBean.java
-ch/boye/httpclientandroidlib/conn/params/ConnRouteParamBean.java
-ch/boye/httpclientandroidlib/conn/params/ConnRouteParams.java
-ch/boye/httpclientandroidlib/conn/params/ConnRoutePNames.java
-ch/boye/httpclientandroidlib/conn/routing/BasicRouteDirector.java
-ch/boye/httpclientandroidlib/conn/routing/HttpRoute.java
-ch/boye/httpclientandroidlib/conn/routing/HttpRouteDirector.java
-ch/boye/httpclientandroidlib/conn/routing/HttpRoutePlanner.java
-ch/boye/httpclientandroidlib/conn/routing/RouteInfo.java
-ch/boye/httpclientandroidlib/conn/routing/RouteTracker.java
-ch/boye/httpclientandroidlib/conn/scheme/HostNameResolver.java
-ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactory.java
-ch/boye/httpclientandroidlib/conn/scheme/LayeredSchemeSocketFactoryAdaptor.java
-ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactory.java
-ch/boye/httpclientandroidlib/conn/scheme/LayeredSocketFactoryAdaptor.java
-ch/boye/httpclientandroidlib/conn/scheme/PlainSocketFactory.java
-ch/boye/httpclientandroidlib/conn/scheme/Scheme.java
-ch/boye/httpclientandroidlib/conn/scheme/SchemeRegistry.java
-ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactory.java
-ch/boye/httpclientandroidlib/conn/scheme/SchemeSocketFactoryAdaptor.java
-ch/boye/httpclientandroidlib/conn/scheme/SocketFactory.java
-ch/boye/httpclientandroidlib/conn/scheme/SocketFactoryAdaptor.java
-ch/boye/httpclientandroidlib/conn/ssl/AbstractVerifier.java
-ch/boye/httpclientandroidlib/conn/ssl/AllowAllHostnameVerifier.java
-ch/boye/httpclientandroidlib/conn/ssl/BrowserCompatHostnameVerifier.java
-ch/boye/httpclientandroidlib/conn/ssl/SSLSocketFactory.java
-ch/boye/httpclientandroidlib/conn/ssl/StrictHostnameVerifier.java
-ch/boye/httpclientandroidlib/conn/ssl/TrustManagerDecorator.java
-ch/boye/httpclientandroidlib/conn/ssl/TrustSelfSignedStrategy.java
-ch/boye/httpclientandroidlib/conn/ssl/TrustStrategy.java
-ch/boye/httpclientandroidlib/conn/ssl/X509HostnameVerifier.java
-ch/boye/httpclientandroidlib/conn/util/InetAddressUtils.java
-ch/boye/httpclientandroidlib/ConnectionClosedException.java
-ch/boye/httpclientandroidlib/ConnectionReuseStrategy.java
-ch/boye/httpclientandroidlib/cookie/ClientCookie.java
-ch/boye/httpclientandroidlib/cookie/Cookie.java
-ch/boye/httpclientandroidlib/cookie/CookieAttributeHandler.java
-ch/boye/httpclientandroidlib/cookie/CookieIdentityComparator.java
-ch/boye/httpclientandroidlib/cookie/CookieOrigin.java
-ch/boye/httpclientandroidlib/cookie/CookiePathComparator.java
-ch/boye/httpclientandroidlib/cookie/CookieRestrictionViolationException.java
-ch/boye/httpclientandroidlib/cookie/CookieSpec.java
-ch/boye/httpclientandroidlib/cookie/CookieSpecFactory.java
-ch/boye/httpclientandroidlib/cookie/CookieSpecRegistry.java
-ch/boye/httpclientandroidlib/cookie/MalformedCookieException.java
-ch/boye/httpclientandroidlib/cookie/params/CookieSpecParamBean.java
-ch/boye/httpclientandroidlib/cookie/params/CookieSpecPNames.java
-ch/boye/httpclientandroidlib/cookie/SetCookie.java
-ch/boye/httpclientandroidlib/cookie/SetCookie2.java
-ch/boye/httpclientandroidlib/cookie/SM.java
-ch/boye/httpclientandroidlib/entity/AbstractHttpEntity.java
-ch/boye/httpclientandroidlib/entity/BasicHttpEntity.java
-ch/boye/httpclientandroidlib/entity/BufferedHttpEntity.java
-ch/boye/httpclientandroidlib/entity/ByteArrayEntity.java
-ch/boye/httpclientandroidlib/entity/ContentLengthStrategy.java
-ch/boye/httpclientandroidlib/entity/ContentProducer.java
-ch/boye/httpclientandroidlib/entity/EntityTemplate.java
-ch/boye/httpclientandroidlib/entity/FileEntity.java
-ch/boye/httpclientandroidlib/entity/HttpEntityWrapper.java
-ch/boye/httpclientandroidlib/entity/InputStreamEntity.java
-ch/boye/httpclientandroidlib/entity/SerializableEntity.java
-ch/boye/httpclientandroidlib/entity/StringEntity.java
-ch/boye/httpclientandroidlib/FormattedHeader.java
-ch/boye/httpclientandroidlib/Header.java
-ch/boye/httpclientandroidlib/HeaderElement.java
-ch/boye/httpclientandroidlib/HeaderElementIterator.java
-ch/boye/httpclientandroidlib/HeaderIterator.java
-ch/boye/httpclientandroidlib/HttpClientConnection.java
-ch/boye/httpclientandroidlib/HttpConnection.java
-ch/boye/httpclientandroidlib/HttpConnectionMetrics.java
-ch/boye/httpclientandroidlib/HttpEntity.java
-ch/boye/httpclientandroidlib/HttpEntityEnclosingRequest.java
-ch/boye/httpclientandroidlib/HttpException.java
-ch/boye/httpclientandroidlib/HttpHeaders.java
-ch/boye/httpclientandroidlib/HttpHost.java
-ch/boye/httpclientandroidlib/HttpInetConnection.java
-ch/boye/httpclientandroidlib/HttpMessage.java
-ch/boye/httpclientandroidlib/HttpRequest.java
-ch/boye/httpclientandroidlib/HttpRequestFactory.java
-ch/boye/httpclientandroidlib/HttpRequestInterceptor.java
-ch/boye/httpclientandroidlib/HttpResponse.java
-ch/boye/httpclientandroidlib/HttpResponseFactory.java
-ch/boye/httpclientandroidlib/HttpResponseInterceptor.java
-ch/boye/httpclientandroidlib/HttpServerConnection.java
-ch/boye/httpclientandroidlib/HttpStatus.java
-ch/boye/httpclientandroidlib/HttpVersion.java
-ch/boye/httpclientandroidlib/impl/AbstractHttpClientConnection.java
-ch/boye/httpclientandroidlib/impl/AbstractHttpServerConnection.java
-ch/boye/httpclientandroidlib/impl/auth/AuthSchemeBase.java
-ch/boye/httpclientandroidlib/impl/auth/BasicScheme.java
-ch/boye/httpclientandroidlib/impl/auth/BasicSchemeFactory.java
-ch/boye/httpclientandroidlib/impl/auth/DigestScheme.java
-ch/boye/httpclientandroidlib/impl/auth/DigestSchemeFactory.java
-ch/boye/httpclientandroidlib/impl/auth/NTLMEngine.java
-ch/boye/httpclientandroidlib/impl/auth/NTLMEngineException.java
-ch/boye/httpclientandroidlib/impl/auth/NTLMEngineImpl.java
-ch/boye/httpclientandroidlib/impl/auth/NTLMScheme.java
-ch/boye/httpclientandroidlib/impl/auth/NTLMSchemeFactory.java
-ch/boye/httpclientandroidlib/impl/auth/RFC2617Scheme.java
-ch/boye/httpclientandroidlib/impl/auth/SpnegoTokenGenerator.java
-ch/boye/httpclientandroidlib/impl/auth/UnsupportedDigestAlgorithmException.java
-ch/boye/httpclientandroidlib/impl/client/AbstractAuthenticationHandler.java
-ch/boye/httpclientandroidlib/impl/client/AbstractHttpClient.java
-ch/boye/httpclientandroidlib/impl/client/BasicAuthCache.java
-ch/boye/httpclientandroidlib/impl/client/BasicCookieStore.java
-ch/boye/httpclientandroidlib/impl/client/BasicCredentialsProvider.java
-ch/boye/httpclientandroidlib/impl/client/BasicResponseHandler.java
-ch/boye/httpclientandroidlib/impl/client/ClientParamsStack.java
-ch/boye/httpclientandroidlib/impl/client/ContentEncodingHttpClient.java
-ch/boye/httpclientandroidlib/impl/client/DefaultConnectionKeepAliveStrategy.java
-ch/boye/httpclientandroidlib/impl/client/DefaultHttpClient.java
-ch/boye/httpclientandroidlib/impl/client/DefaultHttpRequestRetryHandler.java
-ch/boye/httpclientandroidlib/impl/client/DefaultProxyAuthenticationHandler.java
-ch/boye/httpclientandroidlib/impl/client/DefaultRedirectHandler.java
-ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategy.java
-ch/boye/httpclientandroidlib/impl/client/DefaultRedirectStrategyAdaptor.java
-ch/boye/httpclientandroidlib/impl/client/DefaultRequestDirector.java
-ch/boye/httpclientandroidlib/impl/client/DefaultTargetAuthenticationHandler.java
-ch/boye/httpclientandroidlib/impl/client/DefaultUserTokenHandler.java
-ch/boye/httpclientandroidlib/impl/client/EntityEnclosingRequestWrapper.java
-ch/boye/httpclientandroidlib/impl/client/RedirectLocations.java
-ch/boye/httpclientandroidlib/impl/client/RequestWrapper.java
-ch/boye/httpclientandroidlib/impl/client/RoutedRequest.java
-ch/boye/httpclientandroidlib/impl/client/TunnelRefusedException.java
-ch/boye/httpclientandroidlib/impl/conn/AbstractClientConnAdapter.java
-ch/boye/httpclientandroidlib/impl/conn/AbstractPooledConnAdapter.java
-ch/boye/httpclientandroidlib/impl/conn/AbstractPoolEntry.java
-ch/boye/httpclientandroidlib/impl/conn/ConnectionShutdownException.java
-ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnection.java
-ch/boye/httpclientandroidlib/impl/conn/DefaultClientConnectionOperator.java
-ch/boye/httpclientandroidlib/impl/conn/DefaultHttpRoutePlanner.java
-ch/boye/httpclientandroidlib/impl/conn/DefaultResponseParser.java
-ch/boye/httpclientandroidlib/impl/conn/HttpInetSocketAddress.java
-ch/boye/httpclientandroidlib/impl/conn/IdleConnectionHandler.java
-ch/boye/httpclientandroidlib/impl/conn/LoggingSessionInputBuffer.java
-ch/boye/httpclientandroidlib/impl/conn/LoggingSessionOutputBuffer.java
-ch/boye/httpclientandroidlib/impl/conn/ProxySelectorRoutePlanner.java
-ch/boye/httpclientandroidlib/impl/conn/SchemeRegistryFactory.java
-ch/boye/httpclientandroidlib/impl/conn/SingleClientConnManager.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/AbstractConnPool.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPooledConnAdapter.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntry.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/BasicPoolEntryRef.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/ConnPoolByRoute.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/PoolEntryRequest.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueHandler.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/RefQueueWorker.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/RouteSpecificPool.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/ThreadSafeClientConnManager.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThread.java
-ch/boye/httpclientandroidlib/impl/conn/tsccm/WaitingThreadAborter.java
-ch/boye/httpclientandroidlib/impl/conn/Wire.java
-ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieAttributeHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/AbstractCookieSpec.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicClientCookie2.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicCommentHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicDomainHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicExpiresHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicMaxAgeHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicPathHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/BasicSecureHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpec.java
-ch/boye/httpclientandroidlib/impl/cookie/BestMatchSpecFactory.java
-ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpec.java
-ch/boye/httpclientandroidlib/impl/cookie/BrowserCompatSpecFactory.java
-ch/boye/httpclientandroidlib/impl/cookie/CookieSpecBase.java
-ch/boye/httpclientandroidlib/impl/cookie/DateParseException.java
-ch/boye/httpclientandroidlib/impl/cookie/DateUtils.java
-ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpec.java
-ch/boye/httpclientandroidlib/impl/cookie/IgnoreSpecFactory.java
-ch/boye/httpclientandroidlib/impl/cookie/NetscapeDomainHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftHeaderParser.java
-ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpec.java
-ch/boye/httpclientandroidlib/impl/cookie/NetscapeDraftSpecFactory.java
-ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixFilter.java
-ch/boye/httpclientandroidlib/impl/cookie/PublicSuffixListParser.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2109DomainHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2109Spec.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2109SpecFactory.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2109VersionHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965CommentUrlAttributeHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965DiscardAttributeHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965DomainAttributeHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965PortAttributeHandler.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965Spec.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965SpecFactory.java
-ch/boye/httpclientandroidlib/impl/cookie/RFC2965VersionAttributeHandler.java
-ch/boye/httpclientandroidlib/impl/DefaultConnectionReuseStrategy.java
-ch/boye/httpclientandroidlib/impl/DefaultHttpClientConnection.java
-ch/boye/httpclientandroidlib/impl/DefaultHttpRequestFactory.java
-ch/boye/httpclientandroidlib/impl/DefaultHttpResponseFactory.java
-ch/boye/httpclientandroidlib/impl/DefaultHttpServerConnection.java
-ch/boye/httpclientandroidlib/impl/EnglishReasonPhraseCatalog.java
-ch/boye/httpclientandroidlib/impl/entity/EntityDeserializer.java
-ch/boye/httpclientandroidlib/impl/entity/EntitySerializer.java
-ch/boye/httpclientandroidlib/impl/entity/LaxContentLengthStrategy.java
-ch/boye/httpclientandroidlib/impl/entity/StrictContentLengthStrategy.java
-ch/boye/httpclientandroidlib/impl/HttpConnectionMetricsImpl.java
-ch/boye/httpclientandroidlib/impl/io/AbstractMessageParser.java
-ch/boye/httpclientandroidlib/impl/io/AbstractMessageWriter.java
-ch/boye/httpclientandroidlib/impl/io/AbstractSessionInputBuffer.java
-ch/boye/httpclientandroidlib/impl/io/AbstractSessionOutputBuffer.java
-ch/boye/httpclientandroidlib/impl/io/ChunkedInputStream.java
-ch/boye/httpclientandroidlib/impl/io/ChunkedOutputStream.java
-ch/boye/httpclientandroidlib/impl/io/ContentLengthInputStream.java
-ch/boye/httpclientandroidlib/impl/io/ContentLengthOutputStream.java
-ch/boye/httpclientandroidlib/impl/io/HttpRequestParser.java
-ch/boye/httpclientandroidlib/impl/io/HttpRequestWriter.java
-ch/boye/httpclientandroidlib/impl/io/HttpResponseParser.java
-ch/boye/httpclientandroidlib/impl/io/HttpResponseWriter.java
-ch/boye/httpclientandroidlib/impl/io/HttpTransportMetricsImpl.java
-ch/boye/httpclientandroidlib/impl/io/IdentityInputStream.java
-ch/boye/httpclientandroidlib/impl/io/IdentityOutputStream.java
-ch/boye/httpclientandroidlib/impl/io/SocketInputBuffer.java
-ch/boye/httpclientandroidlib/impl/io/SocketOutputBuffer.java
-ch/boye/httpclientandroidlib/impl/NoConnectionReuseStrategy.java
-ch/boye/httpclientandroidlib/impl/SocketHttpClientConnection.java
-ch/boye/httpclientandroidlib/impl/SocketHttpServerConnection.java
-ch/boye/httpclientandroidlib/io/BufferInfo.java
-ch/boye/httpclientandroidlib/io/EofSensor.java
-ch/boye/httpclientandroidlib/io/HttpMessageParser.java
-ch/boye/httpclientandroidlib/io/HttpMessageWriter.java
-ch/boye/httpclientandroidlib/io/HttpTransportMetrics.java
-ch/boye/httpclientandroidlib/io/SessionInputBuffer.java
-ch/boye/httpclientandroidlib/io/SessionOutputBuffer.java
-ch/boye/httpclientandroidlib/MalformedChunkCodingException.java
-ch/boye/httpclientandroidlib/message/AbstractHttpMessage.java
-ch/boye/httpclientandroidlib/message/BasicHeader.java
-ch/boye/httpclientandroidlib/message/BasicHeaderElement.java
-ch/boye/httpclientandroidlib/message/BasicHeaderElementIterator.java
-ch/boye/httpclientandroidlib/message/BasicHeaderIterator.java
-ch/boye/httpclientandroidlib/message/BasicHeaderValueFormatter.java
-ch/boye/httpclientandroidlib/message/BasicHeaderValueParser.java
-ch/boye/httpclientandroidlib/message/BasicHttpEntityEnclosingRequest.java
-ch/boye/httpclientandroidlib/message/BasicHttpRequest.java
-ch/boye/httpclientandroidlib/message/BasicHttpResponse.java
-ch/boye/httpclientandroidlib/message/BasicLineFormatter.java
-ch/boye/httpclientandroidlib/message/BasicLineParser.java
-ch/boye/httpclientandroidlib/message/BasicListHeaderIterator.java
-ch/boye/httpclientandroidlib/message/BasicNameValuePair.java
-ch/boye/httpclientandroidlib/message/BasicRequestLine.java
-ch/boye/httpclientandroidlib/message/BasicStatusLine.java
-ch/boye/httpclientandroidlib/message/BasicTokenIterator.java
-ch/boye/httpclientandroidlib/message/BufferedHeader.java
-ch/boye/httpclientandroidlib/message/HeaderGroup.java
-ch/boye/httpclientandroidlib/message/HeaderValueFormatter.java
-ch/boye/httpclientandroidlib/message/HeaderValueParser.java
-ch/boye/httpclientandroidlib/message/LineFormatter.java
-ch/boye/httpclientandroidlib/message/LineParser.java
-ch/boye/httpclientandroidlib/message/ParserCursor.java
-ch/boye/httpclientandroidlib/MethodNotSupportedException.java
-ch/boye/httpclientandroidlib/NameValuePair.java
-ch/boye/httpclientandroidlib/NoHttpResponseException.java
-ch/boye/httpclientandroidlib/params/AbstractHttpParams.java
-ch/boye/httpclientandroidlib/params/BasicHttpParams.java
-ch/boye/httpclientandroidlib/params/CoreConnectionPNames.java
-ch/boye/httpclientandroidlib/params/CoreProtocolPNames.java
-ch/boye/httpclientandroidlib/params/DefaultedHttpParams.java
-ch/boye/httpclientandroidlib/params/HttpAbstractParamBean.java
-ch/boye/httpclientandroidlib/params/HttpConnectionParamBean.java
-ch/boye/httpclientandroidlib/params/HttpConnectionParams.java
-ch/boye/httpclientandroidlib/params/HttpParams.java
-ch/boye/httpclientandroidlib/params/HttpProtocolParamBean.java
-ch/boye/httpclientandroidlib/params/HttpProtocolParams.java
-ch/boye/httpclientandroidlib/params/SyncBasicHttpParams.java
-ch/boye/httpclientandroidlib/ParseException.java
-ch/boye/httpclientandroidlib/protocol/BasicHttpContext.java
-ch/boye/httpclientandroidlib/protocol/BasicHttpProcessor.java
-ch/boye/httpclientandroidlib/protocol/DefaultedHttpContext.java
-ch/boye/httpclientandroidlib/protocol/ExecutionContext.java
-ch/boye/httpclientandroidlib/protocol/HTTP.java
-ch/boye/httpclientandroidlib/protocol/HttpContext.java
-ch/boye/httpclientandroidlib/protocol/HttpDateGenerator.java
-ch/boye/httpclientandroidlib/protocol/HttpExpectationVerifier.java
-ch/boye/httpclientandroidlib/protocol/HttpProcessor.java
-ch/boye/httpclientandroidlib/protocol/HttpRequestExecutor.java
-ch/boye/httpclientandroidlib/protocol/HttpRequestHandler.java
-ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerRegistry.java
-ch/boye/httpclientandroidlib/protocol/HttpRequestHandlerResolver.java
-ch/boye/httpclientandroidlib/protocol/HttpRequestInterceptorList.java
-ch/boye/httpclientandroidlib/protocol/HttpResponseInterceptorList.java
-ch/boye/httpclientandroidlib/protocol/HttpService.java
-ch/boye/httpclientandroidlib/protocol/ImmutableHttpProcessor.java
-ch/boye/httpclientandroidlib/protocol/RequestConnControl.java
-ch/boye/httpclientandroidlib/protocol/RequestContent.java
-ch/boye/httpclientandroidlib/protocol/RequestDate.java
-ch/boye/httpclientandroidlib/protocol/RequestExpectContinue.java
-ch/boye/httpclientandroidlib/protocol/RequestTargetHost.java
-ch/boye/httpclientandroidlib/protocol/RequestUserAgent.java
-ch/boye/httpclientandroidlib/protocol/ResponseConnControl.java
-ch/boye/httpclientandroidlib/protocol/ResponseContent.java
-ch/boye/httpclientandroidlib/protocol/ResponseDate.java
-ch/boye/httpclientandroidlib/protocol/ResponseServer.java
-ch/boye/httpclientandroidlib/protocol/SyncBasicHttpContext.java
-ch/boye/httpclientandroidlib/protocol/UriPatternMatcher.java
-ch/boye/httpclientandroidlib/ProtocolException.java
-ch/boye/httpclientandroidlib/ProtocolVersion.java
-ch/boye/httpclientandroidlib/ReasonPhraseCatalog.java
-ch/boye/httpclientandroidlib/RequestLine.java
-ch/boye/httpclientandroidlib/StatusLine.java
-ch/boye/httpclientandroidlib/TokenIterator.java
-ch/boye/httpclientandroidlib/TruncatedChunkException.java
-ch/boye/httpclientandroidlib/UnsupportedHttpVersionException.java
-ch/boye/httpclientandroidlib/util/ByteArrayBuffer.java
-ch/boye/httpclientandroidlib/util/CharArrayBuffer.java
-ch/boye/httpclientandroidlib/util/EncodingUtils.java
-ch/boye/httpclientandroidlib/util/EntityUtils.java
-ch/boye/httpclientandroidlib/util/ExceptionUtils.java
-ch/boye/httpclientandroidlib/util/LangUtils.java
-ch/boye/httpclientandroidlib/util/VersionInfo.java
-org/json/simple/ItemList.java
-org/json/simple/JSONArray.java
-org/json/simple/JSONAware.java
-org/json/simple/JSONObject.java
-org/json/simple/JSONStreamAware.java
-org/json/simple/JSONValue.java
-org/json/simple/parser/ContainerFactory.java
-org/json/simple/parser/ContentHandler.java
-org/json/simple/parser/JSONParser.java
-org/json/simple/parser/ParseException.java
-org/json/simple/parser/Yylex.java
-org/json/simple/parser/Yytoken.java
-org/mozilla/apache/commons/codec/binary/Base32.java
-org/mozilla/apache/commons/codec/binary/Base32InputStream.java
-org/mozilla/apache/commons/codec/binary/Base32OutputStream.java
-org/mozilla/apache/commons/codec/binary/Base64.java
-org/mozilla/apache/commons/codec/binary/Base64InputStream.java
-org/mozilla/apache/commons/codec/binary/Base64OutputStream.java
-org/mozilla/apache/commons/codec/binary/BaseNCodec.java
-org/mozilla/apache/commons/codec/binary/BaseNCodecInputStream.java
-org/mozilla/apache/commons/codec/binary/BaseNCodecOutputStream.java
-org/mozilla/apache/commons/codec/binary/BinaryCodec.java
-org/mozilla/apache/commons/codec/binary/Hex.java
-org/mozilla/apache/commons/codec/binary/StringUtils.java
-org/mozilla/apache/commons/codec/BinaryDecoder.java
-org/mozilla/apache/commons/codec/BinaryEncoder.java
-org/mozilla/apache/commons/codec/CharEncoding.java
-org/mozilla/apache/commons/codec/Decoder.java
-org/mozilla/apache/commons/codec/DecoderException.java
-org/mozilla/apache/commons/codec/digest/DigestUtils.java
-org/mozilla/apache/commons/codec/Encoder.java
-org/mozilla/apache/commons/codec/EncoderException.java
-org/mozilla/apache/commons/codec/language/AbstractCaverphone.java
-org/mozilla/apache/commons/codec/language/Caverphone.java
-org/mozilla/apache/commons/codec/language/Caverphone1.java
-org/mozilla/apache/commons/codec/language/Caverphone2.java
-org/mozilla/apache/commons/codec/language/ColognePhonetic.java
-org/mozilla/apache/commons/codec/language/DoubleMetaphone.java
-org/mozilla/apache/commons/codec/language/Metaphone.java
-org/mozilla/apache/commons/codec/language/RefinedSoundex.java
-org/mozilla/apache/commons/codec/language/Soundex.java
-org/mozilla/apache/commons/codec/language/SoundexUtils.java
-org/mozilla/apache/commons/codec/net/BCodec.java
-org/mozilla/apache/commons/codec/net/QCodec.java
-org/mozilla/apache/commons/codec/net/QuotedPrintableCodec.java
-org/mozilla/apache/commons/codec/net/RFC1522Codec.java
-org/mozilla/apache/commons/codec/net/URLCodec.java
-org/mozilla/apache/commons/codec/net/Utils.java
-org/mozilla/apache/commons/codec/StringDecoder.java
-org/mozilla/apache/commons/codec/StringEncoder.java
-org/mozilla/apache/commons/codec/StringEncoderComparator.java
deleted file mode 100644
--- a/mobile/android/services/preprocess-sources.mn
+++ /dev/null
@@ -1,4 +0,0 @@
-background/common/GlobalConstants.java
-sync/SyncConstants.java
-background/announcements/AnnouncementsConstants.java
-background/healthreport/HealthReportConstants.java
--- a/toolkit/components/jsdownloads/src/DownloadLegacy.js
+++ b/toolkit/components/jsdownloads/src/DownloadLegacy.js
@@ -126,19 +126,19 @@ DownloadLegacyTransfer.prototype = {
   },
 
   onProgressChange: function DLT_onProgressChange(aWebProgress, aRequest,
                                                   aCurSelfProgress,
                                                   aMaxSelfProgress,
                                                   aCurTotalProgress,
                                                   aMaxTotalProgress)
   {
-    return onProgressChange64(aWebProgress, aRequest, aCurSelfProgress,
-                              aMaxSelfProgress, aCurTotalProgress,
-                              aMaxTotalProgress);
+    this.onProgressChange64(aWebProgress, aRequest, aCurSelfProgress,
+                            aMaxSelfProgress, aCurTotalProgress,
+                            aMaxTotalProgress);
   },
 
   onLocationChange: function () { },
 
   onStatusChange: function DLT_onStatusChange(aWebProgress, aRequest, aStatus,
                                               aMessage)
   {
     // The status change may optionally be received in addition to the state
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -217,16 +217,21 @@ static const int kAvailablePageFileParam
 static const char kAvailablePhysicalMemoryParameter[] = "AvailablePhysicalMemory=";
 static const int kAvailablePhysicalMemoryParameterLen =
   sizeof(kAvailablePhysicalMemoryParameter)-1;
 
 static const char kIsGarbageCollectingParameter[] = "IsGarbageCollecting=";
 static const int kIsGarbageCollectingParameterLen =
   sizeof(kIsGarbageCollectingParameter)-1;
 
+#ifdef XP_WIN
+static const char kBlockedDllsParameter[] = "BlockedDllList=";
+static const int kBlockedDllsParameterLen = sizeof(kBlockedDllsParameter) - 1;
+#endif
+
 // this holds additional data sent via the API
 static Mutex* crashReporterAPILock;
 static Mutex* notesFieldLock;
 static AnnotationTable* crashReporterAPIData_Hash;
 static nsCString* crashReporterAPIData = nullptr;
 static nsCString* notesField = nullptr;
 static bool isGarbageCollecting;
 
@@ -535,16 +540,19 @@ bool MinidumpCallback(
         WriteFile(hFile, "\n", 1, &nBytes, nullptr);
       }
       if (isGarbageCollecting) {
         WriteFile(hFile, kIsGarbageCollectingParameter, kIsGarbageCollectingParameterLen,
                   &nBytes, nullptr);
         WriteFile(hFile, isGarbageCollecting ? "1" : "0", 1, &nBytes, nullptr);
         WriteFile(hFile, "\n", 1, &nBytes, nullptr);
       }
+      WriteFile(hFile, kBlockedDllsParameter, kBlockedDllsParameterLen, &nBytes, nullptr);
+      WriteBlockedDlls(hFile);
+      WriteFile(hFile, "\n", 1, &nBytes, nullptr);
 
       // Try to get some information about memory.
       MEMORYSTATUSEX statex;
       statex.dwLength = sizeof(statex);
       if (GlobalMemoryStatusEx(&statex)) {
         char buffer[128];
         int bufferLen;
 
--- a/toolkit/crashreporter/nsExceptionHandler.h
+++ b/toolkit/crashreporter/nsExceptionHandler.h
@@ -39,16 +39,21 @@ nsresult SetMinidumpPath(const nsAString
 // AnnotateCrashReport and AppendAppNotesToCrashReport may be called from any
 // thread in a chrome process, but may only be called from the main thread in
 // a content process.
 nsresult AnnotateCrashReport(const nsACString& key, const nsACString& data);
 nsresult AppendAppNotesToCrashReport(const nsACString& data);
 
 nsresult SetGarbageCollecting(bool collecting);
 
+#ifdef XP_WIN
+// Implemented by the blocklist, this method writes the blocklist annotation
+void WriteBlockedDlls(HANDLE file);
+#endif
+
 nsresult SetRestartArgs(int argc, char** argv);
 nsresult SetupExtraData(nsIFile* aAppDataDirectory,
                         const nsACString& aBuildID);
 bool GetLastRunCrashID(nsAString& id);
 
 // Registers an additional memory region to be included in the minidump
 nsresult RegisterAppMemory(void* ptr, size_t length);
 nsresult UnregisterAppMemory(void* ptr);
--- a/toolkit/xre/nsWindowsDllBlocklist.cpp
+++ b/toolkit/xre/nsWindowsDllBlocklist.cpp
@@ -15,20 +15,21 @@
 
 #include "nsAutoPtr.h"
 #include "nsThreadUtils.h"
 
 #include "prlog.h"
 
 #include "nsWindowsDllInterceptor.h"
 #include "mozilla/WindowsVersion.h"
+#include "nsWindowsHelpers.h"
 
 using namespace mozilla;
 
-#if defined(MOZ_CRASHREPORTER) && !defined(NO_BLOCKLIST_CRASHREPORTER)
+#ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #endif
 
 #define ALL_VERSIONS   ((unsigned long long)-1LL)
 
 // DLLs sometimes ship without a version number, particularly early
 // releases. Blocking "version <= 0" has the effect of blocking unversioned
 // DLLs (since the call to get version info fails), but not blocking
@@ -133,16 +134,20 @@ static DllBlockInfo sWindowsDllBlocklist
 
   // Older belgian ID card software causes Firefox to crash or hang on
   // shutdown, bug 831285 and 918399.
   { "beid35cardlayer.dll", MAKE_VERSION(3, 5, 6, 6968) },
 
   // bug 925459, bitguard crashes
   { "bitguard.dll", MAKE_VERSION(2, 6, 1694, 24) },
 
+  // bug 812683 - crashes in Windows library when Asus Gamer OSD is installed
+  // Software is discontinued/unsupported
+  { "atkdx11disp.dll", ALL_VERSIONS },
+
   { nullptr, 0 }
 };
 
 #ifndef STATUS_DLL_NOT_FOUND
 #define STATUS_DLL_NOT_FOUND ((DWORD)0xC0000135L)
 #endif
 
 // define this for very verbose dll load debug spew
@@ -215,72 +220,152 @@ CheckASLR(const wchar_t* path)
       ::CloseHandle(map);
     }
     ::CloseHandle(file);
   }
 
   return retval;
 }
 
+// This lock protects both the reentrancy sentinel and the crash reporter
+// data structures.
+static CRITICAL_SECTION sLock;
+
 /**
  * Some versions of Windows call LoadLibraryEx to get the version information
  * for a DLL, which causes our patched LdrLoadDll implementation to re-enter
  * itself and cause infinite recursion and a stack-exhaustion crash. We protect
  * against reentrancy by allowing recursive loads of the same DLL.
  *
  * Note that we don't use __declspec(thread) because that doesn't work in DLLs
  * loaded via LoadLibrary and there can be a limited number of TLS slots, so
  * we roll our own.
  */
 class ReentrancySentinel
 {
 public:
   explicit ReentrancySentinel(const char* dllName)
   {
     DWORD currentThreadId = GetCurrentThreadId();
-    EnterCriticalSection(&sLock);
+    AutoCriticalSection lock(&sLock);
     mPreviousDllName = (*sThreadMap)[currentThreadId];
 
     // If there is a DLL currently being loaded and it has the same name
     // as the current attempt, we're re-entering.
     mReentered = mPreviousDllName && !stricmp(mPreviousDllName, dllName);
     (*sThreadMap)[currentThreadId] = dllName;
-    LeaveCriticalSection(&sLock);
   }
     
   ~ReentrancySentinel()
   {
     DWORD currentThreadId = GetCurrentThreadId();
-    EnterCriticalSection(&sLock);
+    AutoCriticalSection lock(&sLock);
     (*sThreadMap)[currentThreadId] = mPreviousDllName;
-    LeaveCriticalSection(&sLock);
   }
 
   bool BailOut() const
   {
     return mReentered;
   };
     
   static void InitializeStatics()
   {
     InitializeCriticalSection(&sLock);
     sThreadMap = new std::map<DWORD, const char*>;
   }
 
 private:
-  static CRITICAL_SECTION sLock;
   static std::map<DWORD, const char*>* sThreadMap;
 
   const char* mPreviousDllName;
   bool mReentered;
 };
 
-CRITICAL_SECTION ReentrancySentinel::sLock;
 std::map<DWORD, const char*>* ReentrancySentinel::sThreadMap;
 
+/**
+ * This is a linked list of DLLs that have been blocked. It doesn't use
+ * mozilla::LinkedList because this is an append-only list and doesn't need
+ * to be doubly linked.
+ */
+class DllBlockSet
+{
+public:
+  static void Add(const char* name, unsigned long long version);
+
+  // Write the list of blocked DLLs to a file HANDLE. This method is run after
+  // a crash occurs and must therefore not use the heap, etc.
+  static void Write(HANDLE file);
+
+private:
+  DllBlockSet(const char* name, unsigned long long version)
+    : mName(name)
+    , mVersion(version)
+    , mNext(nullptr)
+  {
+  }
+
+  const char* mName; // points into the sWindowsDllBlocklist string
+  unsigned long long mVersion;
+  DllBlockSet* mNext;
+
+  static DllBlockSet* gFirst;
+};
+
+DllBlockSet* DllBlockSet::gFirst;
+
+void
+DllBlockSet::Add(const char* name, unsigned long long version)
+{
+  AutoCriticalSection lock(&sLock);
+  for (DllBlockSet* b = gFirst; b; b = b->mNext) {
+    if (0 == strcmp(b->mName, name) && b->mVersion == version) {
+      return;
+    }
+  }
+  // Not already present
+  DllBlockSet* n = new DllBlockSet(name, version);
+  n->mNext = gFirst;
+  gFirst = n;
+}
+
+void
+DllBlockSet::Write(HANDLE file)
+{
+  AutoCriticalSection lock(&sLock);
+  DWORD nBytes;
+
+  // Because this method is called after a crash occurs, and uses heap memory,
+  // protect this entire block with a structured exception handler.
+  __try {
+    for (DllBlockSet* b = gFirst; b; b = b->mNext) {
+      // write name[,v.v.v.v];
+      WriteFile(file, b->mName, strlen(b->mName), &nBytes, nullptr);
+      if (b->mVersion != -1) {
+        WriteFile(file, ",", 1, &nBytes, nullptr);
+        uint16_t parts[4];
+        parts[0] = b->mVersion >> 48;
+        parts[1] = (b->mVersion >> 32) & 0xFFFF;
+        parts[2] = (b->mVersion >> 16) & 0xFFFF;
+        parts[3] = b->mVersion & 0xFFFF;
+        for (int p = 0; p < 4; ++p) {
+          char buf[32];
+          ltoa(parts[p], buf, 10);
+          WriteFile(file, buf, strlen(buf), &nBytes, nullptr);
+          if (p != 3) {
+            WriteFile(file, ".", 1, &nBytes, nullptr);
+          }
+        }
+      }
+      WriteFile(file, ";", 1, &nBytes, nullptr);
+    }
+  }
+  __except (EXCEPTION_EXECUTE_HANDLER) { }
+}
+
 static
 wchar_t* getFullPath (PWCHAR filePath, wchar_t* fname)
 {
   // In Windows 8, the first parameter seems to be used for more than just the
   // path name.  For example, its numerical value can be 1.  Passing a non-valid
   // pointer to SearchPathW will cause a crash, so we need to check to see if we
   // are handed a valid pointer, and otherwise just pass nullptr to SearchPathW.
   PWCHAR sanitizedFilePath = (intptr_t(filePath) < 1024) ? nullptr : filePath;
@@ -299,16 +384,27 @@ wchar_t* getFullPath (PWCHAR filePath, w
   }
 
   // now actually grab it
   SearchPathW(sanitizedFilePath, fname, L".dll", pathlen + 1, full_fname,
               nullptr);
   return full_fname;
 }
 
+// No builtin function to find the last character matching a set
+static wchar_t* lastslash(wchar_t* s, int len)
+{
+  for (wchar_t* c = s + len - 1; c >= s; --c) {
+    if (*c == L'\\' || *c == L'/') {
+      return c;
+    }
+  }
+  return nullptr;
+}
+
 static NTSTATUS NTAPI
 patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileName, PHANDLE handle)
 {
   // We have UCS2 (UTF16?), we want ASCII, but we also just want the filename portion
 #define DLLNAME_MAX 128
   char dllName[DLLNAME_MAX+1];
   wchar_t *dll_part;
   DllBlockInfo *info;
@@ -325,17 +421,17 @@ patched_LdrLoadDll (PWCHAR filePath, PUL
       fname[len] != 0)
   {
 #ifdef DEBUG
     printf_stderr("LdrLoadDll: non-null terminated string found!\n");
 #endif
     goto continue_loading;
   }
 
-  dll_part = wcsrchr(fname, L'\\');
+  dll_part = lastslash(fname, len);
   if (dll_part) {
     dll_part = dll_part + 1;
     len -= dll_part - fname;
   } else {
     dll_part = fname;
   }
 
 #ifdef DEBUG_very_verbose
@@ -391,16 +487,18 @@ patched_LdrLoadDll (PWCHAR filePath, PUL
     printf_stderr("LdrLoadDll: info->name: '%s'\n", info->name);
 #endif
 
     if ((info->flags == DllBlockInfo::BLOCK_WIN8PLUS_ONLY) &&
         !IsWin8OrLater()) {
       goto continue_loading;
     }
 
+    unsigned long long fVersion = ALL_VERSIONS;
+
     if (info->maxVersion != ALL_VERSIONS) {
       ReentrancySentinel sentinel(dllName);
       if (sentinel.BailOut()) {
         goto continue_loading;
       }
 
       full_fname = getFullPath(filePath, fname);
       if (!full_fname) {
@@ -417,30 +515,31 @@ patched_LdrLoadDll (PWCHAR filePath, PUL
       if (infoSize != 0) {
         nsAutoArrayPtr<unsigned char> infoData(new unsigned char[infoSize]);
         VS_FIXEDFILEINFO *vInfo;
         UINT vInfoLen;
 
         if (GetFileVersionInfoW(full_fname, 0, infoSize, infoData) &&
             VerQueryValueW(infoData, L"\\", (LPVOID*) &vInfo, &vInfoLen))
         {
-          unsigned long long fVersion =
+          fVersion =
             ((unsigned long long)vInfo->dwFileVersionMS) << 32 |
             ((unsigned long long)vInfo->dwFileVersionLS);
 
           // finally do the version check, and if it's greater than our block
           // version, keep loading
           if (fVersion > info->maxVersion)
             load_ok = true;
         }
       }
     }
 
     if (!load_ok) {
       printf_stderr("LdrLoadDll: Blocking load of '%s' -- see http://www.mozilla.com/en-US/blocklist/\n", dllName);
+      DllBlockSet::Add(info->name, fVersion);
       return STATUS_DLL_NOT_FOUND;
     }
   }
 
 continue_loading:
 #ifdef DEBUG_very_verbose
   printf_stderr("LdrLoadDll: continuing load... ('%S')\n", moduleFileName->Buffer);
 #endif
@@ -476,14 +575,22 @@ XRE_SetupDllBlocklist()
 
   bool ok = NtDllIntercept.AddHook("LdrLoadDll", reinterpret_cast<intptr_t>(patched_LdrLoadDll), (void**) &stub_LdrLoadDll);
 
 #ifdef DEBUG
   if (!ok)
     printf_stderr ("LdrLoadDll hook failed, no dll blocklisting active\n");
 #endif
 
-#if defined(MOZ_CRASHREPORTER) && !defined(NO_BLOCKLIST_CRASHREPORTER)
+#ifdef MOZ_CRASHREPORTER
   if (!ok) {
     CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("DllBlockList Failed\n"));
   }
 #endif
 }
+
+#ifdef MOZ_CRASHREPORTER
+void
+CrashReporter::WriteBlockedDlls(HANDLE file)
+{
+  DllBlockSet::Write(file);
+}
+#endif
--- a/xpcom/base/nsWindowsHelpers.h
+++ b/xpcom/base/nsWindowsHelpers.h
@@ -4,16 +4,36 @@
 
 #ifndef nsWindowsHelpers_h
 #define nsWindowsHelpers_h
 
 #include <windows.h>
 #include "nsAutoRef.h"
 #include "nscore.h"
 
+// ----------------------------------------------------------------------------
+// Critical Section helper class
+// ----------------------------------------------------------------------------
+
+class AutoCriticalSection
+{
+public:
+  AutoCriticalSection(LPCRITICAL_SECTION section)
+    : mSection(section)
+  {
+    ::EnterCriticalSection(mSection);
+  }
+  ~AutoCriticalSection()
+  {
+    ::LeaveCriticalSection(mSection);
+  }
+private:
+  LPCRITICAL_SECTION mSection;
+};
+
 template<>
 class nsAutoRefTraits<HKEY>
 {
 public:
   typedef HKEY RawRef;
   static HKEY Void()
   {
     return nullptr;
--- a/xpcom/ds/TimeStamp_windows.cpp
+++ b/xpcom/ds/TimeStamp_windows.cpp
@@ -9,16 +9,17 @@
 
 // XXX Forcing log to be able to catch issues in the field.  Should be removed
 // before this reaches the Release or even Beta channel.
 #define FORCE_PR_LOG
 
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/TimeStamp.h"
+#include "nsWindowsHelpers.h"
 #include <windows.h>
 
 #include "nsCRT.h"
 #include "prlog.h"
 #include "prprf.h"
 #include <stdio.h>
 
 #include <intrin.h>
@@ -180,36 +181,16 @@ static DWORD sLastGTCResult = 0;
 // incremented atomically.
 static DWORD sLastGTCRollover = 0;
 
 namespace mozilla {
 
 typedef ULONGLONG (WINAPI* GetTickCount64_t)();
 static GetTickCount64_t sGetTickCount64 = nullptr;
 
-// ----------------------------------------------------------------------------
-// Critical Section helper class
-// ----------------------------------------------------------------------------
-
-class AutoCriticalSection
-{
-public:
-  AutoCriticalSection(LPCRITICAL_SECTION section)
-    : mSection(section)
-  {
-    ::EnterCriticalSection(mSection);
-  }
-  ~AutoCriticalSection()
-  {
-    ::LeaveCriticalSection(mSection);
-  }
-private:
-  LPCRITICAL_SECTION mSection;
-};
-
 // Function protecting GetTickCount result from rolling over,
 // result is in [ms]
 static ULONGLONG WINAPI
 MozGetTickCount64()
 {
   DWORD GTC = ::GetTickCount();
 
   // Cheaper then CMPXCHG8B