| 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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 // This update is no-op. | 759 // This update is no-op. |
| 760 } | 760 } |
| 761 | 761 |
| 762 _updateVersionFrom23To24() { | 762 _updateVersionFrom23To24() { |
| 763 var oldSetting = Common.settings.createSetting('searchInContentScripts', fal
se); | 763 var oldSetting = Common.settings.createSetting('searchInContentScripts', fal
se); |
| 764 var newSetting = Common.settings.createSetting('searchInAnonymousAndContentS
cripts', false); | 764 var newSetting = Common.settings.createSetting('searchInAnonymousAndContentS
cripts', false); |
| 765 newSetting.set(oldSetting.get()); | 765 newSetting.set(oldSetting.get()); |
| 766 oldSetting.remove(); | 766 oldSetting.remove(); |
| 767 } | 767 } |
| 768 | 768 |
| 769 _updateVersionFrom24To25() { |
| 770 var defaultColumns = {status: true, type: true, initiator: true, size: true,
time: true}; |
| 771 var networkLogColumnsSetting = Common.settings.createSetting('networkLogColu
mns', defaultColumns); |
| 772 var columns = networkLogColumnsSetting.get(); |
| 773 delete columns.product; |
| 774 networkLogColumnsSetting.set(columns); |
| 775 } |
| 776 |
| 769 _migrateSettingsFromLocalStorage() { | 777 _migrateSettingsFromLocalStorage() { |
| 770 // This step migrates all the settings except for the ones below into the br
owser profile. | 778 // This step migrates all the settings except for the ones below into the br
owser profile. |
| 771 var localSettings = new Set([ | 779 var localSettings = new Set([ |
| 772 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints',
'eventListenerBreakpoints', | 780 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints',
'eventListenerBreakpoints', |
| 773 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe
dFiles', 'savedURLs', | 781 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe
dFiles', 'savedURLs', |
| 774 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints' | 782 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints' |
| 775 ]); | 783 ]); |
| 776 if (!window.localStorage) | 784 if (!window.localStorage) |
| 777 return; | 785 return; |
| 778 | 786 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 791 */ | 799 */ |
| 792 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { | 800 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { |
| 793 // If there are too many breakpoints in a storage, it is likely due to a rec
ent bug that caused | 801 // If there are too many breakpoints in a storage, it is likely due to a rec
ent bug that caused |
| 794 // periodical breakpoints duplication leading to inspector slowness. | 802 // periodical breakpoints duplication leading to inspector slowness. |
| 795 if (breakpointsSetting.get().length > maxBreakpointsCount) | 803 if (breakpointsSetting.get().length > maxBreakpointsCount) |
| 796 breakpointsSetting.set([]); | 804 breakpointsSetting.set([]); |
| 797 } | 805 } |
| 798 }; | 806 }; |
| 799 | 807 |
| 800 Common.VersionController._currentVersionName = 'inspectorVersion'; | 808 Common.VersionController._currentVersionName = 'inspectorVersion'; |
| 801 Common.VersionController.currentVersion = 24; | 809 Common.VersionController.currentVersion = 25; |
| 802 | 810 |
| 803 /** | 811 /** |
| 804 * @type {!Common.Settings} | 812 * @type {!Common.Settings} |
| 805 */ | 813 */ |
| 806 Common.settings; | 814 Common.settings; |
| 807 | 815 |
| 808 /** | 816 /** |
| 809 * @enum {symbol} | 817 * @enum {symbol} |
| 810 */ | 818 */ |
| 811 Common.SettingStorageType = { | 819 Common.SettingStorageType = { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 822 return Common.settings.moduleSetting(settingName); | 830 return Common.settings.moduleSetting(settingName); |
| 823 }; | 831 }; |
| 824 | 832 |
| 825 /** | 833 /** |
| 826 * @param {string} settingName | 834 * @param {string} settingName |
| 827 * @return {!Common.Setting} | 835 * @return {!Common.Setting} |
| 828 */ | 836 */ |
| 829 Common.settingForTest = function(settingName) { | 837 Common.settingForTest = function(settingName) { |
| 830 return Common.settings.settingForTest(settingName); | 838 return Common.settings.settingForTest(settingName); |
| 831 }; | 839 }; |
| OLD | NEW |