| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 get: function() | 259 get: function() |
| 260 { | 260 { |
| 261 if (typeof this._value !== "undefined") | 261 if (typeof this._value !== "undefined") |
| 262 return this._value; | 262 return this._value; |
| 263 | 263 |
| 264 this._value = this._defaultValue; | 264 this._value = this._defaultValue; |
| 265 if (this._storage.has(this._name)) { | 265 if (this._storage.has(this._name)) { |
| 266 try { | 266 try { |
| 267 this._value = JSON.parse(this._storage.get(this._name)); | 267 this._value = JSON.parse(this._storage.get(this._name)); |
| 268 } catch(e) { | 268 } catch(e) { |
| 269 this.remove(); | 269 this._storage.remove(this._name); |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 return this._value; | 272 return this._value; |
| 273 }, | 273 }, |
| 274 | 274 |
| 275 /** | 275 /** |
| 276 * @param {V} value | 276 * @param {V} value |
| 277 */ | 277 */ |
| 278 set: function(value) | 278 set: function(value) |
| 279 { | 279 { |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 } | 746 } |
| 747 | 747 |
| 748 /** | 748 /** |
| 749 * @param {string} settingName | 749 * @param {string} settingName |
| 750 * @return {!WebInspector.Setting} | 750 * @return {!WebInspector.Setting} |
| 751 */ | 751 */ |
| 752 WebInspector.settingForTest = function(settingName) | 752 WebInspector.settingForTest = function(settingName) |
| 753 { | 753 { |
| 754 return WebInspector.settings.settingForTest(settingName); | 754 return WebInspector.settings.settingForTest(settingName); |
| 755 } | 755 } |
| OLD | NEW |