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

Unified Diff: runtime/observatory/lib/src/repositories/flag.dart

Issue 2211603002: Centralized event streams (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/repositories/flag.dart
diff --git a/runtime/observatory/lib/src/repositories/flag.dart b/runtime/observatory/lib/src/repositories/flag.dart
index 9a644e60323a209ec502c7ba35f60f5c010f2f13..0072c0e91f74ae8ce18a24e7f1f7ebbef7f553d6 100644
--- a/runtime/observatory/lib/src/repositories/flag.dart
+++ b/runtime/observatory/lib/src/repositories/flag.dart
@@ -17,12 +17,13 @@ class Flag implements M.Flag {
}
class FlagsRepository implements M.FlagsRepository {
- Future<Iterable<Flag>> list(M.VM vm) async{
- if (vm is S.VM) {
- List<Map> flags = ((await vm.getFlagList()) as S.ServiceMap)['flags'];
- return flags.map(_toFlag);
- }
- return const [];
+ final S.VM vm;
+
+ FlagsRepository(this.vm);
+
+ Future<Iterable<Flag>> list() async{
+ List<Map> flags = ((await vm.getFlagList()) as S.ServiceMap)['flags'];
+ return flags.map(_toFlag);
}
static _toFlag(Map map){
« no previous file with comments | « runtime/observatory/lib/src/repositories/event.dart ('k') | runtime/observatory/lib/src/repositories/notification.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698