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

Unified Diff: chrome/browser/resources/settings/prefs/prefs.js

Issue 988783002: Add an initial implementation of the downloads MD settings page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to Michael's comments. Created 5 years, 9 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
Index: chrome/browser/resources/settings/prefs/prefs.js
diff --git a/chrome/browser/resources/settings/prefs/prefs.js b/chrome/browser/resources/settings/prefs/prefs.js
index a50dd7f9852e8b54892725b0cae13f7d54a66405..a13e03bb51337ba72f621648fa9bbaba0212be2a 100644
--- a/chrome/browser/resources/settings/prefs/prefs.js
+++ b/chrome/browser/resources/settings/prefs/prefs.js
@@ -34,6 +34,7 @@ Polymer('cr-settings-prefs', {
this.settings = {};
this.initializeA11y_();
+ this.initializeDownloads_();
var observer = new ObjectObserver(this.settings);
observer.open(this.propertyChangeCallback_.bind(this, 'settings'));
@@ -76,6 +77,17 @@ Polymer('cr-settings-prefs', {
},
/**
+ * Initializes some defaults for the downloads settings.
+ * @private
+ */
+ initializeDownloads_: function() {
+ this.settings.download = {
+ downloadLocation: '',
+ promptForDownload: false,
+ };
+ },
+
+ /**
* @param {string} propertyPath The path before the property names.
* @param {!Array<string>} added An array of keys which were added.
* @param {!Array<string>} removed An array of keys which were removed.

Powered by Google App Engine
This is Rietveld 408576698