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

Unified Diff: chrome/browser/resources/settings/on_startup_page/startup_urls_page.js

Issue 1353453003: [MD settings] fixes for OnStartup using the closure compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes; ; 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/settings/on_startup_page/compiled_resources.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
},
« no previous file with comments | « chrome/browser/resources/settings/on_startup_page/compiled_resources.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698