| Index: chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js
|
| diff --git a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js
|
| index f709547f620a5107b822ddc1d2d5499856b0c8a6..24043ae12632d57a14a41f79d36c9e262baf40bd 100644
|
| --- a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js
|
| +++ b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js
|
| @@ -67,11 +67,13 @@ AutoScanManager.prototype = {
|
| },
|
|
|
| /**
|
| - * Restart auto-scan under the current settings.
|
| + * Restart auto-scan under the current settings if it is currently running.
|
| */
|
| - restart: function() {
|
| - this.stop_();
|
| - this.start_();
|
| + restartIfRunning: function() {
|
| + if (this.isRunning()) {
|
| + this.stop_();
|
| + this.start_();
|
| + }
|
| },
|
|
|
| /**
|
| @@ -95,8 +97,6 @@ AutoScanManager.prototype = {
|
| */
|
| setScanTime: function(scanTime) {
|
| this.scanTime_ = scanTime;
|
| - if (this.isRunning()) {
|
| - this.restart();
|
| - }
|
| + this.restartIfRunning();
|
| },
|
| };
|
|
|