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

Side by Side Diff: packages/barback/lib/src/transformer/barback_settings.dart

Issue 3014633002: Roll to pickup pool changes (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 barback.transformer.barback_settings; 5 library barback.transformer.barback_settings;
6 6
7 /// A generic settings object for providing configuration details to 7 /// A generic settings object for providing configuration details to
8 /// [Transformer]s. 8 /// [Transformer]s.
9 /// 9 ///
10 /// Barback does not specify *how* this is provided to transformers. It is up 10 /// Barback does not specify *how* this is provided to transformers. It is up
(...skipping 30 matching lines...) Expand all
41 41
42 /// The name of the mode. 42 /// The name of the mode.
43 /// 43 ///
44 /// By convention, this is a lowercase string. 44 /// By convention, this is a lowercase string.
45 final String name; 45 final String name;
46 46
47 /// Create a mode named [name]. 47 /// Create a mode named [name].
48 factory BarbackMode(String name) { 48 factory BarbackMode(String name) {
49 // Use canonical instances of known names. 49 // Use canonical instances of known names.
50 switch (name) { 50 switch (name) {
51 case "debug": return BarbackMode.DEBUG; 51 case "debug":
52 case "release": return BarbackMode.RELEASE; 52 return BarbackMode.DEBUG;
53 case "release":
54 return BarbackMode.RELEASE;
53 default: 55 default:
54 return new BarbackMode._(name); 56 return new BarbackMode._(name);
55 } 57 }
56 } 58 }
57 59
58 const BarbackMode._(this.name); 60 const BarbackMode._(this.name);
59 61
60 String toString() => name; 62 String toString() => name;
61 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698