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

Side by Side Diff: pkg/front_end/lib/src/base/instrumentation.dart

Issue 2839003002: Reorder parameters in Instrumentation.record(). (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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:kernel/ast.dart'; 5 import 'package:kernel/ast.dart';
6 6
7 /// Interface providing the ability to record property/value pairs associated 7 /// Interface providing the ability to record property/value pairs associated
8 /// with source file locations. Intended to facilitate testing. 8 /// with source file locations. Intended to facilitate testing.
9 abstract class Instrumentation { 9 abstract class Instrumentation {
10 /// Records a property/value pair associated with the given URI and offset. 10 /// Records a property/value pair associated with the given URI and offset.
11 void record(String property, Uri uri, int offset, InstrumentationValue value); 11 void record(Uri uri, int offset, String property, InstrumentationValue value);
12 } 12 }
13 13
14 /// Interface for values recorded by [Instrumentation]. 14 /// Interface for values recorded by [Instrumentation].
15 abstract class InstrumentationValue { 15 abstract class InstrumentationValue {
16 const InstrumentationValue(); 16 const InstrumentationValue();
17 17
18 /// Checks if the given String is an accurate description of this value. 18 /// Checks if the given String is an accurate description of this value.
19 /// 19 ///
20 /// The default implementation just checks for equality with the return value 20 /// The default implementation just checks for equality with the return value
21 /// of [toString], however derived classes may want a more sophisticated 21 /// of [toString], however derived classes may want a more sophisticated
(...skipping 20 matching lines...) Expand all
42 /// Instance of [InstrumentationValue] which only matches the given literal 42 /// Instance of [InstrumentationValue] which only matches the given literal
43 /// string. 43 /// string.
44 class InstrumentationValueLiteral extends InstrumentationValue { 44 class InstrumentationValueLiteral extends InstrumentationValue {
45 final String value; 45 final String value;
46 46
47 const InstrumentationValueLiteral(this.value); 47 const InstrumentationValueLiteral(this.value);
48 48
49 @override 49 @override
50 String toString() => value; 50 String toString() => value;
51 } 51 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698