Chromium Code Reviews| Index: chrome/browser/resources/settings/on_startup_page/startup_urls_page.js |
| diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js |
| index 3d45fe2411b837f65be5c16203ee8b9aa3c667fe..a967f89270cb3cf5cb397ed4d81af36a0ad442eb 100644 |
| --- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js |
| +++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js |
| @@ -46,17 +46,20 @@ Polymer({ |
| attached: function() { |
| var updateFunction = this.updateStartupPages_.bind(this); |
| cr.define('Settings', function() { |
| + var localFunction = updateFunction; |
| return { |
| - updateStartupPages: updateFunction, |
| + updateStartupPages: localFunction, |
|
Dan Beam
2015/09/18 03:12:23
this is probably some chrome-specific compiler pas
dschuyler
2015/09/18 17:31:13
Acknowledged.
|
| }; |
|
Dan Beam
2015/09/18 03:12:23
does this work?
var self = this;
cr.define('Sett
dschuyler
2015/09/18 17:31:13
Yes, the closure compiler is happy with that.
Don
|
| }); |
| }, |
| + |
| /** @private */ |
| prefsChanged_: function(change) { |
| - if (this.savedUrlList == undefined && |
| - this.get('prefs.session.startup_urls')) { |
| - this.savedUrlList = this.prefs.session.startup_urls.value.slice(); |
| + var pref = /** @type {chrome.settingsPrivate.PrefObject} */( |
| + this.get('prefs.session.startup_urls')); |
| + if (this.savedUrlList == undefined && pref) { |
|
Dan Beam
2015/09/18 03:12:23
nit: !this.savedUrlList instead of == undefined
Dan Beam
2015/09/18 03:12:23
nit: no curlies
dschuyler
2015/09/18 17:31:13
Done.
dschuyler
2015/09/18 17:31:13
Done.
|
| + this.savedUrlList = pref.value.slice(); |
| } |
| }, |