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

Side by Side Diff: chrome/browser/resources/md_history/history_toolbar.js

Issue 2672723002: [MD History] Disable Clear Browsing Data button for supervised users. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 Polymer({ 5 Polymer({
6 is: 'history-toolbar', 6 is: 'history-toolbar',
7 properties: { 7 properties: {
8 // Number of history items currently selected. 8 // Number of history items currently selected.
9 // TODO(calamity): bind this to 9 // TODO(calamity): bind this to
10 // listContainer.selectedItem.selectedPaths.length. 10 // listContainer.selectedItem.selectedPaths.length.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 /** @private */ 185 /** @private */
186 onClearSelectionTap_: function() { 186 onClearSelectionTap_: function() {
187 this.fire('unselect-all'); 187 this.fire('unselect-all');
188 }, 188 },
189 189
190 /** @private */ 190 /** @private */
191 onDeleteTap_: function() { 191 onDeleteTap_: function() {
192 this.fire('delete-selected'); 192 this.fire('delete-selected');
193 }, 193 },
194 194
195 /**
196 * If the user is a supervised user the delete button is not shown.
197 * @private
198 */
199 deletingAllowed_: function() {
200 return loadTimeData.getBoolean('allowDeletingHistory');
201 },
202
203 /** @private */ 195 /** @private */
204 numberOfItemsSelected_: function(count) { 196 numberOfItemsSelected_: function(count) {
205 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; 197 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : '';
206 }, 198 },
207 199
208 /** @private */ 200 /** @private */
209 getHistoryInterval_: function() { 201 getHistoryInterval_: function() {
210 var info = this.queryInfo; 202 var info = this.queryInfo;
211 if (!info) 203 if (!info)
212 return; 204 return;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 }, 244 },
253 245
254 /** 246 /**
255 * @private 247 * @private
256 * @return {boolean} 248 * @return {boolean}
257 */ 249 */
258 isToday_: function() { 250 isToday_: function() {
259 return this.groupedOffset == 0; 251 return this.groupedOffset == 0;
260 }, 252 },
261 }); 253 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698