| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 visibleColumnSettings.remove(); | 684 visibleColumnSettings.remove(); |
| 685 } | 685 } |
| 686 | 686 |
| 687 _updateVersionFrom19To20() { | 687 _updateVersionFrom19To20() { |
| 688 var oldSetting = Common.settings.createSetting('InspectorView.panelOrder', {
}); | 688 var oldSetting = Common.settings.createSetting('InspectorView.panelOrder', {
}); |
| 689 var newSetting = Common.settings.createSetting('panel-tabOrder', {}); | 689 var newSetting = Common.settings.createSetting('panel-tabOrder', {}); |
| 690 newSetting.set(oldSetting.get()); | 690 newSetting.set(oldSetting.get()); |
| 691 oldSetting.remove(); | 691 oldSetting.remove(); |
| 692 } | 692 } |
| 693 | 693 |
| 694 _updateVersionFrom20To21() { |
| 695 var networkColumns = Common.settings.createSetting('networkLogColumns', {}); |
| 696 var columns = /** @type {!Object} */ (networkColumns.get()); |
| 697 delete columns['timeline']; |
| 698 delete columns['waterfall']; |
| 699 networkColumns.set(columns); |
| 700 } |
| 701 |
| 694 _migrateSettingsFromLocalStorage() { | 702 _migrateSettingsFromLocalStorage() { |
| 695 // This step migrates all the settings except for the ones below into the br
owser profile. | 703 // This step migrates all the settings except for the ones below into the br
owser profile. |
| 696 var localSettings = new Set([ | 704 var localSettings = new Set([ |
| 697 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints',
'eventListenerBreakpoints', | 705 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints',
'eventListenerBreakpoints', |
| 698 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe
dFiles', 'savedURLs', | 706 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe
dFiles', 'savedURLs', |
| 699 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints' | 707 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints' |
| 700 ]); | 708 ]); |
| 701 if (!window.localStorage) | 709 if (!window.localStorage) |
| 702 return; | 710 return; |
| 703 | 711 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 716 */ | 724 */ |
| 717 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { | 725 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { |
| 718 // If there are too many breakpoints in a storage, it is likely due to a rec
ent bug that caused | 726 // If there are too many breakpoints in a storage, it is likely due to a rec
ent bug that caused |
| 719 // periodical breakpoints duplication leading to inspector slowness. | 727 // periodical breakpoints duplication leading to inspector slowness. |
| 720 if (breakpointsSetting.get().length > maxBreakpointsCount) | 728 if (breakpointsSetting.get().length > maxBreakpointsCount) |
| 721 breakpointsSetting.set([]); | 729 breakpointsSetting.set([]); |
| 722 } | 730 } |
| 723 }; | 731 }; |
| 724 | 732 |
| 725 Common.VersionController._currentVersionName = 'inspectorVersion'; | 733 Common.VersionController._currentVersionName = 'inspectorVersion'; |
| 726 Common.VersionController.currentVersion = 20; | 734 Common.VersionController.currentVersion = 21; |
| 727 | 735 |
| 728 /** | 736 /** |
| 729 * @type {!Common.Settings} | 737 * @type {!Common.Settings} |
| 730 */ | 738 */ |
| 731 Common.settings; | 739 Common.settings; |
| 732 | 740 |
| 733 /** | 741 /** |
| 734 * @param {string} settingName | 742 * @param {string} settingName |
| 735 * @return {!Common.Setting} | 743 * @return {!Common.Setting} |
| 736 */ | 744 */ |
| 737 Common.moduleSetting = function(settingName) { | 745 Common.moduleSetting = function(settingName) { |
| 738 return Common.settings.moduleSetting(settingName); | 746 return Common.settings.moduleSetting(settingName); |
| 739 }; | 747 }; |
| 740 | 748 |
| 741 /** | 749 /** |
| 742 * @param {string} settingName | 750 * @param {string} settingName |
| 743 * @return {!Common.Setting} | 751 * @return {!Common.Setting} |
| 744 */ | 752 */ |
| 745 Common.settingForTest = function(settingName) { | 753 Common.settingForTest = function(settingName) { |
| 746 return Common.settings.settingForTest(settingName); | 754 return Common.settings.settingForTest(settingName); |
| 747 }; | 755 }; |
| OLD | NEW |