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

Unified Diff: runtime/bin/vmservice/client/lib/src/elements/script_ref.dart

Issue 184233007: Refactor Observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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: runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/script_ref.dart b/runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
similarity index 80%
rename from runtime/bin/vmservice/client/lib/src/observatory_elements/script_ref.dart
rename to runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
index 05bf87ab45106ebbef52a3a813b1d87c759456b3..4f2794be9e93a720d72f085a2743d5223afc7d7f 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/script_ref.dart
+++ b/runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
@@ -11,16 +11,13 @@ import 'service_ref.dart';
class ScriptRefElement extends ServiceRefElement {
@published int line = -1;
- String get url {
- if ((app != null) && (ref != null)) {
- var baseUrl = relativeLink(ref['id']);
- if (line < 0) {
- return baseUrl;
- } else {
- return '$baseUrl?line=$line';
- }
+ String get objectId {
+ if (line < 0) {
+ return super.objectId;
}
- return '';
+ // TODO(johnmccutchan): Add a ?line=XX invalidates the idea that this
+ // method returns an objectId.
+ return '${super.objectId}?line=$line';
}
String get hoverText {

Powered by Google App Engine
This is Rietveld 408576698