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

Unified Diff: pkg/analyzer_plugin/lib/utilities/subscription_manager.dart

Issue 2846963004: Re-organize and comment clean-up (Closed)
Patch Set: Created 3 years, 8 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: pkg/analyzer_plugin/lib/utilities/subscription_manager.dart
diff --git a/pkg/analyzer_plugin/lib/utilities/subscription_manager.dart b/pkg/analyzer_plugin/lib/utilities/subscription_manager.dart
deleted file mode 100644
index 59f97585f3533fbffcd193c9f35149e2a1e92acc..0000000000000000000000000000000000000000
--- a/pkg/analyzer_plugin/lib/utilities/subscription_manager.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer_plugin/protocol/protocol_generated.dart';
-
-/**
- * An object that manages the subscriptions for analysis results.
- */
-class SubscriptionManager {
- /**
- * The current set of subscriptions.
- */
- Map<AnalysisService, List<String>> _subscriptions;
-
- /**
- * Initialize a newly created subscription manager to have no subscriptions.
- */
- SubscriptionManager();
-
- /**
- * Return a list of the services for which the file with the given [filePath]
- * has been subscribed.
- */
- List<AnalysisService> servicesForFile(String filePath) {
- List<AnalysisService> services = <AnalysisService>[];
- if (_subscriptions != null) {
- _subscriptions.forEach((AnalysisService service, List<String> files) {
- if (files.contains(filePath)) {
- services.add(service);
- }
- });
- }
- return services;
- }
-
- /**
- * Set the current set of subscriptions to those described by the given map of
- * [subscriptions].
- */
- void setSubscriptions(Map<AnalysisService, List<String>> subscriptions) {
- _subscriptions = subscriptions;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698