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..94ca8b5b6c324b8fae7c7791a6ba567aa46e9b25 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 |
| @@ -47,16 +47,21 @@ Polymer({ |
| var updateFunction = this.updateStartupPages_.bind(this); |
| cr.define('Settings', function() { |
| return { |
| - updateStartupPages: updateFunction, |
| + updateStartupPages: function(data) { |
| + updateFunction(data); |
| + }, |
|
Dan Beam
2015/09/18 01:42:05
you shouldn't need to make an extra scope just to
dschuyler
2015/09/18 02:36:29
I've moved the declaration to a var.
(I also found
|
| }; |
| }); |
| }, |
| + |
| /** @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')); |
|
Dan Beam
2015/09/18 01:42:05
why can't you re-use the .get() call above? e.g.
dschuyler
2015/09/18 02:36:29
Done.
|
| + this.savedUrlList = pref.value.slice(); |
| } |
| }, |