| OLD | NEW |
| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 get_file.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 } |
| OLD | NEW |