Chromium Code Reviews| Index: chrome/browser/resources/settings/pref_tracker/pref_tracker.js |
| diff --git a/chrome/browser/resources/settings/pref_tracker/pref_tracker.js b/chrome/browser/resources/settings/pref_tracker/pref_tracker.js |
| index b042ecafb332267780d5511da7f5b582fe256e3b..f323351dd7e401c37ac5892649f4991bbbf694ca 100644 |
| --- a/chrome/browser/resources/settings/pref_tracker/pref_tracker.js |
| +++ b/chrome/browser/resources/settings/pref_tracker/pref_tracker.js |
| @@ -68,14 +68,11 @@ |
| // HACK ALERT: This is the best clue we have as to the pref key for |
| // this tracker. This value should not be relied upon anywhere or |
| // actually used besides for this error message. |
| - var keyHint = ''; |
| - var parentPrefString = this.parentNode && this.parentNode.host && |
| - this.parentNode.host.getAttribute('pref'); |
| - if (parentPrefString) { |
| - keyHint = parentPrefString.match(/{{([a-z0-9._]+)}}/)[1]; |
| - } |
| + var parentControlHTML = this.parentNode && this.parentNode.host && |
| + this.parentNode.host.outerHTML; |
| - throw new Error('Pref not found. Key Hint: ' + keyHint); |
| + throw new Error( |
| + 'Pref not found. Parent control:' + parentControlHTML); |
|
Kyle Horimoto
2015/06/05 20:14:20
nit: Might not want to output parentControlHTML if
|
| } |
| }); |
| }, |