Fix Firefox download mechanism.

This pulls the new mozdownload as well as requests (which is required
by the new mozdownload), and updates our scripts as necessary.

BUG=545862
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1457493002 .
diff --git a/DEPS b/DEPS
index 4b89a94..c53c21e 100644
--- a/DEPS
+++ b/DEPS
@@ -12,7 +12,7 @@
   'webrtc.DEPS/third_party/manifestdestiny':
     Var('git_url') + '/chromium/deps/manifestdestiny.git@46ae53ac463e23bfefec374a81806355ea598ac4',
   'webrtc.DEPS/third_party/mozdownload':
-    Var('git_url') + '/chromium/deps/mozdownload.git@dcb2344c8f16caae7762c4557d08f2eca536a40a',
+    Var('git_url') + '/chromium/deps/mozdownload.git@5d3e0bf7851b093ff9a89d45f13185691c496be',
   'webrtc.DEPS/third_party/mozinfo':
     Var('git_url') + '/chromium/deps/mozinfo.git@f4cc257e21c48bc33dc1d12123d934a4dcaa120c',
   'webrtc.DEPS/third_party/mozprocess':
@@ -21,6 +21,8 @@
     Var('git_url') + '/chromium/deps/mozprofile.git@313295a0d9e1687dafa58e12f1f01b093a136446',
   'webrtc.DEPS/third_party/mozrunner':
     Var('git_url') + '/chromium/deps/mozrunner.git@efb11330692424f7aa5533839b0ae728bc5f30d1',
+  'webrtc.DEPS/third_party/requests/':
+    Var('git_url') + '/external/github.com/kennethreitz/requests.git@2128321b85dfd969498e5d1636dcc3c4a27917ba'
 }
 
 hooks = [
@@ -90,14 +92,14 @@
                "--recursive",
                "src/chrome/test/data/webrtc/resources/tools"],
   },
-  #{
+  {
     # Download firefox for the Firefox AppRTC test.
     # TODO(phoglund): Disabled due to http://crbug.com/545862.
-    #"pattern": ".",
-    #"action" : ["python",
-    #            "webrtc.DEPS/download_firefox_nightly.py",
-    #            "--clean-old-firefox-archives",
-    #            "--target-dir",
-    #            "firefox-nightly"],
-  #},
+    "pattern": ".",
+    "action" : ["python",
+                "webrtc.DEPS/download_firefox_nightly.py",
+                "--clean-old-firefox-archives",
+                "--target-dir",
+                "firefox-nightly"],
+  },
 ]
diff --git a/download_firefox_nightly.py b/download_firefox_nightly.py
index 23cd6b0..719d3d0 100755
--- a/download_firefox_nightly.py
+++ b/download_firefox_nightly.py
@@ -22,7 +22,9 @@
 
 sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozdownload'))
 sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozinfo'))
+sys.path.append(os.path.join(THIRD_PARTY_DIR, 'requests'))
 
+from mozdownload import errors
 from mozdownload import scraper
 import utils
 
@@ -70,7 +72,7 @@
 
 def _MaybeDownload(target_dir, force):
   try:
-    downloader = scraper.DailyScraper(directory=target_dir, version=None)
+    downloader = scraper.DailyScraper(destination=target_dir)
     filename = downloader.build_filename(downloader.binary)
     firefox_archive = os.path.join(target_dir, filename)
 
@@ -85,7 +87,7 @@
     downloader.download()
     print 'Downloaded %s' % firefox_archive
     return firefox_archive
-  except scraper.NotFoundException as exception:
+  except errors.NotFoundError as exception:
     print 'Failed to download firefox: %s.' % exception
     fallback_build, age_days = _FindFallbackFirefoxBuild(target_dir)