Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(852)

Side by Side Diff: bootstrap/win/get_file.js

Issue 99233: Add unzip.js instead of using 7za.exe. It greatly reduces the depot_tools.zip... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bootstrap/win/7za.exe ('k') | bootstrap/win/unzip.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function Download(url, path, verbose) { 5 function Download(url, path, verbose) {
6 if (verbose) { 6 if (verbose) {
7 WScript.StdOut.Write(" * GET " + url + "..."); 7 WScript.StdOut.Write(" * GET " + url + "...");
8 } 8 }
9 try { 9 try {
10 xml_http = new ActiveXObject("MSXML2.ServerXMLHTTP"); 10 xml_http = new ActiveXObject("MSXML2.ServerXMLHTTP");
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (length < 1 || !length.isInt()) { 105 if (length < 1 || !length.isInt()) {
106 throw Exception("Length must be a positive integer larger than 0.", 106 throw Exception("Length must be a positive integer larger than 0.",
107 "RangeError", 0); 107 "RangeError", 0);
108 } 108 }
109 var result = (this + (this < 0 ? 0x100000000 : 0)).toString(16); 109 var result = (this + (this < 0 ? 0x100000000 : 0)).toString(16);
110 while (result.length < length) result = "0" + result; 110 while (result.length < length) result = "0" + result;
111 return result; 111 return result;
112 }; 112 };
113 113
114 if (WScript.Arguments.length != 2) { 114 if (WScript.Arguments.length != 2) {
115 WScript.StdOut.Write("Incorrect arguments to download.js") 115 WScript.StdOut.Write("Incorrect arguments to get_file.js")
116 } else { 116 } else {
117 Download(WScript.Arguments(0), WScript.Arguments(1), false); 117 Download(WScript.Arguments(0), WScript.Arguments(1), false);
118 } 118 }
OLDNEW
« no previous file with comments | « bootstrap/win/7za.exe ('k') | bootstrap/win/unzip.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698