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

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

Issue 2692923013: DevTools: do not search in anonymous scripts unless specifically asked for. (Closed)
Patch Set: address comments Created 3 years, 10 months 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
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 breakpoint['url'] = breakpoint['sourceFileId']; 724 breakpoint['url'] = breakpoint['sourceFileId'];
725 delete breakpoint['sourceFileId']; 725 delete breakpoint['sourceFileId'];
726 } 726 }
727 breakpointsSetting.set(breakpoints); 727 breakpointsSetting.set(breakpoints);
728 } 728 }
729 729
730 _updateVersionFrom22To23() { 730 _updateVersionFrom22To23() {
731 // This update is no-op. 731 // This update is no-op.
732 } 732 }
733 733
734 _updateVersionFrom23To24() {
735 var oldSetting = Common.settings.createSetting('searchInContentScripts', fal se);
736 var newSetting = Common.settings.createSetting('searchInAnonymousAndContentS cripts', false);
737 newSetting.set(oldSetting.get());
738 oldSetting.remove();
739 }
740
734 _migrateSettingsFromLocalStorage() { 741 _migrateSettingsFromLocalStorage() {
735 // This step migrates all the settings except for the ones below into the br owser profile. 742 // This step migrates all the settings except for the ones below into the br owser profile.
736 var localSettings = new Set([ 743 var localSettings = new Set([
737 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints', 'eventListenerBreakpoints', 744 'advancedSearchConfig', 'breakpoints', 'consoleHistory', 'domBreakpoints', 'eventListenerBreakpoints',
738 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe dFiles', 'savedURLs', 745 'fileSystemMapping', 'lastSelectedSourcesSidebarPaneTab', 'previouslyViewe dFiles', 'savedURLs',
739 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints' 746 'watchExpressions', 'workspaceExcludedFolders', 'xhrBreakpoints'
740 ]); 747 ]);
741 if (!window.localStorage) 748 if (!window.localStorage)
742 return; 749 return;
743 750
(...skipping 12 matching lines...) Expand all
756 */ 763 */
757 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { 764 _clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) {
758 // If there are too many breakpoints in a storage, it is likely due to a rec ent bug that caused 765 // If there are too many breakpoints in a storage, it is likely due to a rec ent bug that caused
759 // periodical breakpoints duplication leading to inspector slowness. 766 // periodical breakpoints duplication leading to inspector slowness.
760 if (breakpointsSetting.get().length > maxBreakpointsCount) 767 if (breakpointsSetting.get().length > maxBreakpointsCount)
761 breakpointsSetting.set([]); 768 breakpointsSetting.set([]);
762 } 769 }
763 }; 770 };
764 771
765 Common.VersionController._currentVersionName = 'inspectorVersion'; 772 Common.VersionController._currentVersionName = 'inspectorVersion';
766 Common.VersionController.currentVersion = 23; 773 Common.VersionController.currentVersion = 24;
767 774
768 /** 775 /**
769 * @type {!Common.Settings} 776 * @type {!Common.Settings}
770 */ 777 */
771 Common.settings; 778 Common.settings;
772 779
773 /** 780 /**
774 * @param {string} settingName 781 * @param {string} settingName
775 * @return {!Common.Setting} 782 * @return {!Common.Setting}
776 */ 783 */
777 Common.moduleSetting = function(settingName) { 784 Common.moduleSetting = function(settingName) {
778 return Common.settings.moduleSetting(settingName); 785 return Common.settings.moduleSetting(settingName);
779 }; 786 };
780 787
781 /** 788 /**
782 * @param {string} settingName 789 * @param {string} settingName
783 * @return {!Common.Setting} 790 * @return {!Common.Setting}
784 */ 791 */
785 Common.settingForTest = function(settingName) { 792 Common.settingForTest = function(settingName) {
786 return Common.settings.settingForTest(settingName); 793 return Common.settings.settingForTest(settingName);
787 }; 794 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698