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

Side by Side Diff: chrome/browser/resources/options2/chromeos/proxy_rules_list.js

Issue 10827141: Move handling of dialog preferences to Preferences class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix my rushed copy & paste :( Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options.proxyexceptions', function() { 5 cr.define('options.proxyexceptions', function() {
6 /** @const */ var List = cr.ui.List; 6 /** @const */ var List = cr.ui.List;
7 /** @const */ var ListItem = cr.ui.ListItem; 7 /** @const */ var ListItem = cr.ui.ListItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 9
10 /** 10 /**
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 * @param {Array} exceptions An array of exception object. 85 * @param {Array} exceptions An array of exception object.
86 */ 86 */
87 load_: function(exceptions) { 87 load_: function(exceptions) {
88 this.dataModel = new ArrayDataModel(exceptions); 88 this.dataModel = new ArrayDataModel(exceptions);
89 }, 89 },
90 90
91 /** 91 /**
92 * Updates backend. 92 * Updates backend.
93 */ 93 */
94 updateBackend_: function() { 94 updateBackend_: function() {
95 Preferences.setListPref(this.pref, this.dataModel.slice()); 95 Preferences.setListPref(this.pref, this.dataModel.slice(), true);
96 } 96 }
97 }; 97 };
98 98
99 /** 99 /**
100 * Creates a new exception list item. 100 * Creates a new exception list item.
101 * @param {Object} exception The exception account this represents. 101 * @param {Object} exception The exception account this represents.
102 * @constructor 102 * @constructor
103 * @extends {cr.ui.ListItem} 103 * @extends {cr.ui.ListItem}
104 */ 104 */
105 function ProxyExceptionsItem(exception) { 105 function ProxyExceptionsItem(exception) {
(...skipping 24 matching lines...) Expand all
130 labelException.className = ''; 130 labelException.className = '';
131 labelException.textContent = this.exception; 131 labelException.textContent = this.exception;
132 this.appendChild(labelException); 132 this.appendChild(labelException);
133 } 133 }
134 }; 134 };
135 135
136 return { 136 return {
137 ProxyExceptions: ProxyExceptions 137 ProxyExceptions: ProxyExceptions
138 }; 138 };
139 }); 139 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698