Chromium Code Reviews| Index: Source/devtools/front_end/settings/EditFileSystemDialog.js |
| diff --git a/Source/devtools/front_end/settings/EditFileSystemDialog.js b/Source/devtools/front_end/settings/EditFileSystemDialog.js |
| index e332bff9e3d07f6c525a5b0c663e0407adb6eba0..3f5f71be936024747ecb22fc612374e60c1fbaba 100644 |
| --- a/Source/devtools/front_end/settings/EditFileSystemDialog.js |
| +++ b/Source/devtools/front_end/settings/EditFileSystemDialog.js |
| @@ -88,6 +88,7 @@ WebInspector.EditFileSystemDialog = function(fileSystemPath) |
| this._addExcludedFolderRow(excludedFolderEntries[i]); |
| this.element.tabIndex = 0; |
| + this._hasMappingChanges = false; |
| } |
| WebInspector.EditFileSystemDialog.show = function(element, fileSystemPath) |
| @@ -137,6 +138,10 @@ WebInspector.EditFileSystemDialog.prototype = { |
| willHide: function(event) |
| { |
| + if (!this._hasMappingChanges) |
| + return; |
| + if (window.confirm(WebInspector.UIString("It is recommended to restart DevTools after making these changes. Would you like to restart it?"))) |
| + WebInspector.reload(); |
| }, |
| _fileMappingAdded: function(event) |
| @@ -229,6 +234,7 @@ WebInspector.EditFileSystemDialog.prototype = { |
| var entry = this._entries[urlPrefix]; |
| WebInspector.isolatedFileSystemManager.mapping().removeFileMapping(entry.fileSystemPath, entry.urlPrefix, entry.pathPrefix); |
| + this._hasMappingChanges = true; |
|
lushnikov
2014/08/04 09:52:23
dont' we want to have these flags on in callbacks
|
| }, |
| /** |
| @@ -241,6 +247,7 @@ WebInspector.EditFileSystemDialog.prototype = { |
| var normalizedURLPrefix = this._normalizePrefix(urlPrefix); |
| var normalizedPathPrefix = this._normalizePrefix(pathPrefix); |
| WebInspector.isolatedFileSystemManager.mapping().addFileMapping(this._fileSystemPath, normalizedURLPrefix, normalizedPathPrefix); |
| + this._hasMappingChanges = true; |
| this._fileMappingsList.selectItem(normalizedURLPrefix); |
| return true; |
| }, |