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

Unified Diff: tools/dom/scripts/monitored.py

Issue 554853002: "Reverting 39948" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « tools/dom/scripts/idlnode_test.py ('k') | tools/dom/scripts/multiemitter.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/monitored.py
diff --git a/tools/dom/scripts/monitored.py b/tools/dom/scripts/monitored.py
index d8316cf660b03b2d9bcebdf1fbf78790b3744320..5d180c96964e2b9a97bc855fb0d2592b657114ed 100644
--- a/tools/dom/scripts/monitored.py
+++ b/tools/dom/scripts/monitored.py
@@ -3,17 +3,16 @@
# 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.
-
"""This module provides maps and sets that report unused elements."""
_monitored_values = []
-def FinishMonitoring(includeDart2jsOnly, logger):
+def FinishMonitoring(includeDart2jsOnly):
for value in _monitored_values:
if value._dart2jsOnly and not includeDart2jsOnly:
continue
- value.CheckUsage(logger)
+ value.CheckUsage()
class MonitoredCollection(object):
def __init__(self, name, dart2jsOnly):
@@ -50,10 +49,10 @@ class Dict(MonitoredCollection):
def keys(self):
return self._map.keys()
- def CheckUsage(self, logger):
+ def CheckUsage(self):
for v in sorted(self._map.keys()):
if v not in self._used_keys:
- logger.warn('dict \'%s\' has unused key \'%s\'' % (self.name, v))
+ print "dict '%s' has unused key '%s'" % (self.name, v)
class Set(MonitoredCollection):
@@ -73,7 +72,7 @@ class Set(MonitoredCollection):
def add(self, key):
self._set += [key]
- def CheckUsage(self, logger):
+ def CheckUsage(self):
for v in sorted(self._set):
if v not in self._used_keys:
- logger.warn('set \'%s\' has unused key \'%s\'' % (self.name, v))
+ print "set '%s' has unused key '%s'" % (self.name, v)
« no previous file with comments | « tools/dom/scripts/idlnode_test.py ('k') | tools/dom/scripts/multiemitter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698