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

Side by Side Diff: tools/testing/dart/drt_updater.dart

Issue 10920003: Use new syntax for getters in test.dart and its libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « no previous file | tools/testing/dart/test_progress.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("drt_updater"); 5 #library("drt_updater");
6 6
7 #import("dart:io"); 7 #import("dart:io");
8 8
9 class _DartiumUpdater { 9 class _DartiumUpdater {
10 String name; 10 String name;
(...skipping 15 matching lines...) Expand all
26 onUpdated = [() {updated = true;} ]; 26 onUpdated = [() {updated = true;} ];
27 _updatingProcess = Process.start('python', _getUpdateCommand); 27 _updatingProcess = Process.start('python', _getUpdateCommand);
28 _updatingProcess.onExit = _onUpdatedHandler; 28 _updatingProcess.onExit = _onUpdatedHandler;
29 _updatingProcess.onError = (error) { 29 _updatingProcess.onError = (error) {
30 print("Error starting $script process: $error"); 30 print("Error starting $script process: $error");
31 _onUpdatedHandler(-1); // Continue anyway. 31 _onUpdatedHandler(-1); // Continue anyway.
32 }; 32 };
33 } 33 }
34 } 34 }
35 35
36 List<String> get _getUpdateCommand() { 36 List<String> get _getUpdateCommand {
37 String scriptPath = new Options().script.replaceAll('\\', '/'); 37 String scriptPath = new Options().script.replaceAll('\\', '/');
38 String toolsDir = scriptPath.substring(0, scriptPath.lastIndexOf('/')); 38 String toolsDir = scriptPath.substring(0, scriptPath.lastIndexOf('/'));
39 List<String> command = ['$toolsDir/$script']; 39 List<String> command = ['$toolsDir/$script'];
40 if (null !== option) { 40 if (null !== option) {
41 command.add(option); 41 command.add(option);
42 } 42 }
43 return command; 43 return command;
44 } 44 }
45 45
46 void _onUpdatedHandler(int exit_code) { 46 void _onUpdatedHandler(int exit_code) {
(...skipping 18 matching lines...) Expand all
65 // Download the default Dartium from Google Storage. 65 // Download the default Dartium from Google Storage.
66 if (_dartiumUpdater === null) { 66 if (_dartiumUpdater === null) {
67 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_archive.py', 67 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_archive.py',
68 'dartium'); 68 'dartium');
69 } 69 }
70 return _dartiumUpdater; 70 return _dartiumUpdater;
71 } else { 71 } else {
72 return null; 72 return null;
73 } 73 }
74 } 74 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_progress.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698