upload_symbols: Sort larger files first.

This restores functionality in the upload_symbols script that was lost
in the rewrite. Upload the larger files first, since they are probably
more important to have uploaded.

BUG=chromium:610902
TEST=Unittests

Change-Id: Iafef4d436738634f7ae8f3ed981f63959cc36d28
Previous-Reviewed-on: https://chromium-review.googlesource.com/358622
(cherry picked from commit 606a82adff6aa6150242b0c18b1e99d2412e97af)
Reviewed-on: https://chromium-review.googlesource.com/363054
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/upload_symbols.py b/scripts/upload_symbols.py
index 2332825..5817891 100644
--- a/scripts/upload_symbols.py
+++ b/scripts/upload_symbols.py
@@ -597,6 +597,11 @@
   with osutils.TempDir(prefix='upload_symbols.') as tempdir:
     symbols = FindSymbolFiles(tempdir, sym_paths)
 
+    # Sort all of our symbols so the largest ones (probably the most important)
+    # are processed first.
+    symbols = list(symbols)
+    symbols.sort(key=lambda s: s.FileSize(), reverse=True)
+
     if upload_limit is not None:
       # Restrict symbols processed to the limit.
       symbols = itertools.islice(symbols, None, upload_limit)