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

Side by Side Diff: samples/chat/chat_server_lib.dart

Issue 11194025: Second round of cleanups for new optional parameter semantics. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
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("chat_server"); 5 #library("chat_server");
6 #import("dart:io"); 6 #import("dart:io");
7 #import("dart:isolate"); 7 #import("dart:isolate");
8 #import("dart:json"); 8 #import("dart:json");
9 #import("dart:math"); 9 #import("dart:math");
10 10
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Map<String, Function> _callbacks; 217 Map<String, Function> _callbacks;
218 } 218 }
219 219
220 220
221 class ChatServerCommand { 221 class ChatServerCommand {
222 static const START = 0; 222 static const START = 0;
223 static const STOP = 1; 223 static const STOP = 1;
224 224
225 ChatServerCommand.start(String this._host, 225 ChatServerCommand.start(String this._host,
226 int this._port, 226 int this._port,
227 [int backlog = 5, 227 {int backlog: 5,
228 bool logging = false]) 228 bool logging: false})
229 : _command = START, _backlog = backlog, _logging = logging; 229 : _command = START, _backlog = backlog, _logging = logging;
230 ChatServerCommand.stop() : _command = STOP; 230 ChatServerCommand.stop() : _command = STOP;
231 231
232 bool get isStart => _command == START; 232 bool get isStart => _command == START;
233 bool get isStop => _command == STOP; 233 bool get isStop => _command == STOP;
234 234
235 String get host => _host; 235 String get host => _host;
236 int get port => _port; 236 int get port => _port;
237 bool get logging => _logging; 237 bool get logging => _logging;
238 int get backlog => _backlog; 238 int get backlog => _backlog;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 684 }
685 } 685 }
686 686
687 int _timeRange; 687 int _timeRange;
688 List<int> _buckets; 688 List<int> _buckets;
689 int _currentBucket; 689 int _currentBucket;
690 int _currentBucketTime; 690 int _currentBucketTime;
691 num _bucketTimeRange; 691 num _bucketTimeRange;
692 int _sum; 692 int _sum;
693 } 693 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698