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

Side by Side Diff: chrome/browser/resources/settings/pref_tracker/pref_tracker.js

Issue 1315173003: PrefObject -> PrefData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * `cr-settings-pref-tracker` is a utility element used to track the 7 * `cr-settings-pref-tracker` is a utility element used to track the
8 * initialization of a specified preference and throw an error if the pref 8 * initialization of a specified preference and throw an error if the pref
9 * is not defined after prefs have all been fetched. 9 * is not defined after prefs have all been fetched.
10 * 10 *
(...skipping 23 matching lines...) Expand all
34 }; 34 };
35 35
36 document.addEventListener(CrSettingsPrefs.INITIALIZED, validateAll_); 36 document.addEventListener(CrSettingsPrefs.INITIALIZED, validateAll_);
37 37
38 Polymer({ 38 Polymer({
39 is: 'cr-settings-pref-tracker', 39 is: 'cr-settings-pref-tracker',
40 40
41 properties: { 41 properties: {
42 /** 42 /**
43 * The Preference object being tracked. 43 * The Preference object being tracked.
44 * @type {?PrefObject} 44 * @type {?PrefData}
45 */ 45 */
46 pref: { 46 pref: {
47 type: Object, 47 type: Object,
48 observer: 'validate_', 48 observer: 'validate_',
49 }, 49 },
50 }, 50 },
51 51
52 /** @override */ 52 /** @override */
53 ready: function() { 53 ready: function() {
54 this.validate_(); 54 this.validate_();
(...skipping 16 matching lines...) Expand all
71 var parentControlHTML = this.parentNode && this.parentNode.host && 71 var parentControlHTML = this.parentNode && this.parentNode.host &&
72 this.parentNode.host.outerHTML; 72 this.parentNode.host.outerHTML;
73 73
74 throw new Error('Pref not found. Parent control:' + 74 throw new Error('Pref not found. Parent control:' +
75 (parentControlHTML || 'Unknown')); 75 (parentControlHTML || 'Unknown'));
76 } 76 }
77 }); 77 });
78 }, 78 },
79 }); 79 });
80 })(); 80 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/checkbox/checkbox.js ('k') | chrome/browser/resources/settings/prefs/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698