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

Unified Diff: runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart

Issue 2294073003: Converted Observatory class-view element (Closed)
Patch Set: Addressed comments 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
« no previous file with comments | « runtime/observatory/tests/observatory_ui/mocks/objects/script.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
index ffbf3bf2df075566c15dc34558ebed73ae10ad98..6b5c0d00b641bf5e78e290d6ace5a10a233a2170 100644
--- a/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/sample_profile.dart
@@ -28,24 +28,46 @@ class SampleProfileLoadingProgressMock
}
typedef Stream<M.SampleProfileLoadingProgressEvent>
- ClassSampleProfileRepositoryMockCallback(M.ClassRef cls,
+ ClassSampleProfileRepositoryMockCallback(M.Isolate isolate, M.ClassRef cls,
M.SampleProfileTag tag, bool clear);
+typedef Future ClassSampleProfileRepositoryMockToggleCallback(M.Isolate isolate,
+ M.ClassRef cls);
class ClassSampleProfileRepositoryMock
implements M.ClassSampleProfileRepository {
final ClassSampleProfileRepositoryMockCallback _get;
+ final ClassSampleProfileRepositoryMockToggleCallback _enable;
+ final ClassSampleProfileRepositoryMockToggleCallback _disable;
- Stream<M.SampleProfileLoadingProgressEvent> get(M.ClassRef cls,
- M.SampleProfileTag tag, {bool clear: false}) {
+ Stream<M.SampleProfileLoadingProgressEvent> get(M.Isolate isolate,
+ M.ClassRef cls, M.SampleProfileTag tag, {bool clear: false}) {
if (_get != null) {
- return _get(cls, tag, clear);
+ return _get(isolate, cls, tag, clear);
}
return null;
}
+ Future enable(M.Isolate isolate, M.ClassRef cls) {
+ if (_enable != null) {
+ return _enable(isolate, cls);
+ }
+ return new Future.value();
+ }
+
+ Future disable(M.Isolate isolate, M.ClassRef cls) {
+ if (_disable != null) {
+ return _disable(isolate, cls);
+ }
+ return new Future.value();
+ }
+
ClassSampleProfileRepositoryMock(
- {ClassSampleProfileRepositoryMockCallback getter})
- : _get = getter;
+ {ClassSampleProfileRepositoryMockCallback getter,
+ ClassSampleProfileRepositoryMockToggleCallback enable,
+ ClassSampleProfileRepositoryMockToggleCallback disable})
+ : _get = getter,
+ _enable = enable,
+ _disable = disable;
}
typedef Stream<M.SampleProfileLoadingProgressEvent>
« no previous file with comments | « runtime/observatory/tests/observatory_ui/mocks/objects/script.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698