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

Unified Diff: third_party/pkg/perf_api/lib/console_impl.dart

Issue 1086713003: Remove everything but markdown from third_party (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « third_party/pkg/perf_api/REVISION ('k') | third_party/pkg/perf_api/lib/perf_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/perf_api/lib/console_impl.dart
diff --git a/third_party/pkg/perf_api/lib/console_impl.dart b/third_party/pkg/perf_api/lib/console_impl.dart
deleted file mode 100644
index 6b023eb7bb8fa29cb4e8ed7d646a90c5d0892ff8..0000000000000000000000000000000000000000
--- a/third_party/pkg/perf_api/lib/console_impl.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-library perf_api.console_impl;
-
-import 'dart:html' as dom;
-import 'dart:collection';
-import 'perf_api.dart';
-
-/**
- * Simple window.console based implementation.
- */
-class ConsoleProfiler extends Profiler {
- int _timerIds = 0;
- Map<int, String> _timers = new Map<int, String>();
- Map<int, String> _timerNames = new LinkedHashMap<int, String>();
- final dom.Window window;
-
- ConsoleProfiler() :this.window = dom.window;
-
- ConsoleProfiler.forWindow(this.window);
-
- dynamic startTimer(String name, [dynamic extraData]) {
- var timerId = _timerIds++;
- _timers[timerId] = _timerName(name, extraData);
- _timerNames[timerId] = name;
- window.console.time(_timerStr(timerId, _timers[timerId]));
- return timerId;
- }
-
- String _timerName(String name, dynamic extraData) =>
- '$name${_stringifyExtraData(extraData)}';
-
- String _stringifyExtraData(extraData) =>
- (extraData == null || extraData is! String) ? '' : ' $extraData';
-
- String _timerStr(id, name) => '${name} ($id)';
-
- void stopTimer(dynamic idOrName) {
- int timerId;
- if (idOrName is int) {
- timerId = idOrName;
- } else {
- // TODO: change this to use a multimap.
- for (var id in _timerNames.keys) {
- if (_timerNames[id] == idOrName) {
- timerId = id;
- break;
- }
- }
- }
- if (timerId == null) {
- throw new ProfilerError('Unable for find timer for $idOrName');
- }
- window.console.timeEnd(_timerStr(timerId, _timers[timerId]));
- _timerNames.remove(timerId);
- _timers.remove(timerId);
- }
-
- void markTime(String name, [dynamic extraData]) {
- window.console.timeStamp(_timerName(name, extraData));
- }
-}
« no previous file with comments | « third_party/pkg/perf_api/REVISION ('k') | third_party/pkg/perf_api/lib/perf_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698