Chromium Code Reviews| Index: site/try/src/user_option.dart |
| =================================================================== |
| --- site/try/src/user_option.dart (revision 39366) |
| +++ site/try/src/user_option.dart (working copy) |
| @@ -35,6 +35,12 @@ |
| void set value(newValue) { |
| storage[name] = newValue; |
| } |
| + |
| + void setIfNotInitialized(newValueEvaluator()) { |
| + if (storage[name] == null) { |
| + value = newValueEvaluator(); |
| + } |
| + } |
| } |
| class BooleanUserOption extends UserOption { |