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

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

Issue 2112593003: [DevTools] Remove [V8] from InspectorInstrumentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup, moving csp event to dom debugger Created 4 years, 5 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 393
394 /** 394 /**
395 * @constructor 395 * @constructor
396 */ 396 */
397 WebInspector.VersionController = function() 397 WebInspector.VersionController = function()
398 { 398 {
399 } 399 }
400 400
401 WebInspector.VersionController._currentVersionName = "inspectorVersion"; 401 WebInspector.VersionController._currentVersionName = "inspectorVersion";
402 WebInspector.VersionController.currentVersion = 18; 402 WebInspector.VersionController.currentVersion = 19;
403 403
404 WebInspector.VersionController.prototype = { 404 WebInspector.VersionController.prototype = {
405 updateVersion: function() 405 updateVersion: function()
406 { 406 {
407 var localStorageVersion = window.localStorage ? window.localStorage[WebI nspector.VersionController._currentVersionName] : 0; 407 var localStorageVersion = window.localStorage ? window.localStorage[WebI nspector.VersionController._currentVersionName] : 0;
408 var versionSetting = WebInspector.settings.createSetting(WebInspector.Ve rsionController._currentVersionName, 0); 408 var versionSetting = WebInspector.settings.createSetting(WebInspector.Ve rsionController._currentVersionName, 0);
409 var currentVersion = WebInspector.VersionController.currentVersion; 409 var currentVersion = WebInspector.VersionController.currentVersion;
410 // While localStorage version exists, treat it as the main one. It'll be erased once migrated to prefs. 410 // While localStorage version exists, treat it as the main one. It'll be erased once migrated to prefs.
411 var oldVersion = parseInt(localStorageVersion || "0", 10) || versionSett ing.get(); 411 var oldVersion = parseInt(localStorageVersion || "0", 10) || versionSett ing.get();
412 if (oldVersion === 0) { 412 if (oldVersion === 0) {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 if (newKey.startsWith("/")) 693 if (newKey.startsWith("/"))
694 newKey = "file://" + newKey; 694 newKey = "file://" + newKey;
695 else 695 else
696 newKey = "file:///" + newKey; 696 newKey = "file:///" + newKey;
697 } 697 }
698 newValue[newKey] = oldValue[oldKey]; 698 newValue[newKey] = oldValue[oldKey];
699 } 699 }
700 setting.set(newValue); 700 setting.set(newValue);
701 }, 701 },
702 702
703 _updateVersionFrom18To19: function()
704 {
705 var setting = WebInspector.settings.createLocalSetting("eventListenerBre akpoints", []);
706 var list = setting.get();
707 list.push({eventName: "instrumentation:scriptBlockedByCSP", targetNames: ["*"]});
708 setting.set(list);
709 },
710
703 _migrateSettingsFromLocalStorage: function() 711 _migrateSettingsFromLocalStorage: function()
704 { 712 {
705 // This step migrates all the settings except for the ones below into th e browser profile. 713 // This step migrates all the settings except for the ones below into th e browser profile.
706 var localSettings = [ "advancedSearchConfig", "breakpoints", "consoleHis tory", "domBreakpoints", "eventListenerBreakpoints", 714 var localSettings = [ "advancedSearchConfig", "breakpoints", "consoleHis tory", "domBreakpoints", "eventListenerBreakpoints",
707 "fileSystemMapping", "lastSelectedSourcesSidebarPa neTab", "previouslyViewedFiles", 715 "fileSystemMapping", "lastSelectedSourcesSidebarPa neTab", "previouslyViewedFiles",
708 "savedURLs", "watchExpressions", "workspaceExclude dFolders", "xhrBreakpoints" ].keySet(); 716 "savedURLs", "watchExpressions", "workspaceExclude dFolders", "xhrBreakpoints" ].keySet();
709 if (!window.localStorage) 717 if (!window.localStorage)
710 return; 718 return;
711 719
712 for (var key in window.localStorage) { 720 for (var key in window.localStorage) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 754 }
747 755
748 /** 756 /**
749 * @param {string} settingName 757 * @param {string} settingName
750 * @return {!WebInspector.Setting} 758 * @return {!WebInspector.Setting}
751 */ 759 */
752 WebInspector.settingForTest = function(settingName) 760 WebInspector.settingForTest = function(settingName)
753 { 761 {
754 return WebInspector.settings.settingForTest(settingName); 762 return WebInspector.settings.settingForTest(settingName);
755 } 763 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698