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

Unified Diff: runtime/observatory/lib/src/app/location_manager.dart

Issue 2340973002: Improve VM connection flow in Observatory (Closed)
Patch Set: ... Created 4 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 | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/app/page.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/app/location_manager.dart
diff --git a/runtime/observatory/lib/src/app/location_manager.dart b/runtime/observatory/lib/src/app/location_manager.dart
index ae684b8b1dfa35749c32a7b4a761c4c779a31d7c..fe3daa8b20dd5211252ad7f08ffc3f4db094cc28 100644
--- a/runtime/observatory/lib/src/app/location_manager.dart
+++ b/runtime/observatory/lib/src/app/location_manager.dart
@@ -5,8 +5,6 @@
part of app;
class LocationManager {
- final _defaultPath = '/vm';
-
final ObservatoryApplication _app;
/// [internalArguments] are parameters specified after a '---' in the
@@ -25,7 +23,8 @@ class LocationManager {
if ((window.location.hash == '') || (window.location.hash == '#')) {
// Observatory has loaded but no application path has been specified,
// use the default.
- applicationPath = makeLink(_defaultPath);
+ // By default we navigate to the VM page.
+ applicationPath = Uris.vm();
}
// Update current application path.
window.history.replaceState(applicationPath,
@@ -54,7 +53,7 @@ class LocationManager {
/// Update the application location. After this function returns,
/// [uri] and [debugArguments] will be updated.
_updateApplicationLocation(String url) {
- if (url == makeLink('/vm-connect')) {
+ if (url == Uris.vmConnect()) {
// When we go to the vm-connect page, drop all notifications.
_app.notifications.deleteAll();
}
@@ -111,15 +110,6 @@ class LocationManager {
/// Navigate to [url].
void go(String url, [bool addToBrowserHistory = true]) {
- if ((url != makeLink('/vm-connect')) &&
- (_app.vm == null || _app.vm.isDisconnected)) {
- if (!window.confirm('Connection with VM has been lost. '
- 'Proceeding will lose current page.')) {
- return;
- }
- url = makeLink('/vm-connect');
- }
-
if (addToBrowserHistory) {
_addToBrowserHistory(url);
}
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/app/page.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698