Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/common/Settings.js

Issue 2515213005: DevTools: cleanup breakpointManager after removal of NetworkMapping (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 } 692 }
693 693
694 _updateVersionFrom20To21() { 694 _updateVersionFrom20To21() {
695 var networkColumns = Common.settings.createSetting('networkLogColumns', {}); 695 var networkColumns = Common.settings.createSetting('networkLogColumns', {});
696 var columns = /** @type {!Object} */ (networkColumns.get()); 696 var columns = /** @type {!Object} */ (networkColumns.get());
697 delete columns['timeline']; 697 delete columns['timeline'];
698 delete columns['waterfall']; 698 delete columns['waterfall'];
699 networkColumns.set(columns); 699 networkColumns.set(columns);
700 } 700 }
701 701
702 _updateVersionFrom21To22() {
703 var breakpointsSetting = Common.settings.createLocalSetting('breakpoints', [ ]);
704 var breakpoints = breakpointsSetting.get();
705 for (var breakpoint of breakpoints) {
706 if (breakpoint.sourceFileId && !breakpoint.url) {
707 breakpoint.url = breakpoint.sourceFileId;
dgozman 2016/11/22 01:44:41 Don't you want to always set an url? Or it could b
lushnikov 2016/11/22 02:09:46 Agreed. I always want this.
708 delete breakpoint.sourceFileId;
709 }
710 }
711 breakpointsSetting.set(breakpoints);
712 }
713
702 _migrateSettingsFromLocalStorage() { 714 _migrateSettingsFromLocalStorage() {
703 // This step migrates all the settings except for the ones below into the br owser profile. 715 // This step migrates all the settings except for the ones below into the br owser profile.
704 var localSettings = new Set([ 716 var localSettings = new Set([
705 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints', 'eventListenerBreakpoints', 717 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints', 'eventListenerBreakpoints',
706 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe dFiles', 'savedURLs', 718 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe dFiles', 'savedURLs',
707 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints' 719 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints'
708 ]); 720 ]);
709 if (!window.localStorage) 721 if (!window.localStorage)
710 return; 722 return;
711 723
(...skipping 12 matching lines...) Expand all
724 */ 736 */
725 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { 737 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) {
726 // If there are too many breakpoints in a storage, it is likely due to a rec ent bug that caused 738 // If there are too many breakpoints in a storage, it is likely due to a rec ent bug that caused
727 // periodical breakpoints duplication leading to inspector slowness. 739 // periodical breakpoints duplication leading to inspector slowness.
728 if (breakpointsSetting.get().length > maxBreakpointsCount) 740 if (breakpointsSetting.get().length > maxBreakpointsCount)
729 breakpointsSetting.set([]); 741 breakpointsSetting.set([]);
730 } 742 }
731 }; 743 };
732 744
733 Common.VersionController._currentVersionName = 'inspectorVersion'; 745 Common.VersionController._currentVersionName = 'inspectorVersion';
734 Common.VersionController.currentVersion = 21; 746 Common.VersionController.currentVersion = 22;
735 747
736 /** 748 /**
737 * @type {!Common.Settings} 749 * @type {!Common.Settings}
738 */ 750 */
739 Common.settings; 751 Common.settings;
740 752
741 /** 753 /**
742 * @param {string} settingName 754 * @param {string} settingName
743 * @return {!Common.Setting} 755 * @return {!Common.Setting}
744 */ 756 */
745 Common.moduleSetting = function(settingName) { 757 Common.moduleSetting = function(settingName) {
746 return Common.settings.moduleSetting(settingName); 758 return Common.settings.moduleSetting(settingName);
747 }; 759 };
748 760
749 /** 761 /**
750 * @param {string} settingName 762 * @param {string} settingName
751 * @return {!Common.Setting} 763 * @return {!Common.Setting}
752 */ 764 */
753 Common.settingForTest = function(settingName) { 765 Common.settingForTest = function(settingName) {
754 return Common.settings.settingForTest(settingName); 766 return Common.settings.settingForTest(settingName);
755 }; 767 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698