Skip to content

Commit 5f342e8

Browse files
committed
nassh: prefs: drop old relay-host/relay-port migration
This code has been broken since it was added in 2013 -- it has a typo when it tries to set the "relay-option" field (it's "relay-options") which causes the code to fail. Anyone hitting this code path probably reinstalled the app to clear their prefs and thereby clear these. So drop the unused migration code. Change-Id: I891d05058e59e327428a4e6c0952e765bcac0e21 Reviewed-on: https://chromium-review.googlesource.com/c/1352190 Reviewed-by: Vitaliy Shipitsyn <[email protected]> Tested-by: Mike Frysinger <[email protected]>
1 parent 3c1964c commit 5f342e8

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

nassh/css/nassh_connect_dialog.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ a:hover {
155155
}
156156

157157
#field-username,
158-
#field-relay-port,
159158
#field-port {
160159
max-width: 10em;
161160
}

nassh/js/nassh_preference_manager.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,6 @@ nassh.ProfilePreferenceManager = function(parent, id) {
7979
*/
8080
['port', null],
8181

82-
/**
83-
* The relay host, hardcoded to use nassh.GoogleRelay at the moment.
84-
*/
85-
['relay-host', ''],
86-
87-
/**
88-
* The optional relay port.
89-
*/
90-
['relay-port', ''],
91-
9282
/**
9383
* Options string for relay.
9484
* Supported values: --use-xhr and --use-ssl.
@@ -129,37 +119,3 @@ nassh.ProfilePreferenceManager = function(parent, id) {
129119
nassh.ProfilePreferenceManager.prototype =
130120
Object.create(lib.PreferenceManager.prototype);
131121
nassh.ProfilePreferenceManager.constructor = nassh.ProfilePreferenceManager;
132-
133-
nassh.ProfilePreferenceManager.prototype.readStorage = function(opt_callback) {
134-
var appendOption = (str) => {
135-
var options = this.get('relay-options');
136-
if (options) {
137-
options += ' ' + str;
138-
} else {
139-
options = str;
140-
}
141-
142-
this.set('relay-option', options);
143-
};
144-
145-
var onRead = () => {
146-
var host = this.get('relay-host');
147-
if (host) {
148-
console.warn('Merging relay-host preference with relay-options');
149-
this.reset('relay-host');
150-
appendOption('--proxy-host=' + host);
151-
}
152-
153-
var port = this.get('relay-port');
154-
if (port) {
155-
this.reset('relay-port');
156-
console.warn('Merging relay-host preference with relay-options');
157-
appendOption('--proxy-port=' + port);
158-
}
159-
160-
if (opt_callback)
161-
opt_callback();
162-
};
163-
164-
lib.PreferenceManager.prototype.readStorage.call(this, onRead);
165-
};

0 commit comments

Comments
 (0)