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

Side by Side Diff: chrome/browser/resources/settings/device_page/storage.js

Issue 2557073003: Call preventDefault in all on-tap events that show a dialog. (Closed)
Patch Set: nit Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-storage' is the settings subpage for storage settings. 7 * 'settings-storage' is the settings subpage for storage settings.
8 */ 8 */
9 cr.exportPath('settings'); 9 cr.exportPath('settings');
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 /** 108 /**
109 * Handler for tapping the "Downloads" item. 109 * Handler for tapping the "Downloads" item.
110 * @private 110 * @private
111 */ 111 */
112 onDownloadsTap_: function() { 112 onDownloadsTap_: function() {
113 chrome.send('openDownloads'); 113 chrome.send('openDownloads');
114 }, 114 },
115 115
116 /** 116 /**
117 * Handler for tapping the "Offline files" item. 117 * Handler for tapping the "Offline files" item.
118 * @param {!Event} e
118 * @private 119 * @private
119 */ 120 */
120 onDriveCacheTap_: function() { 121 onDriveCacheTap_: function(e) {
122 e.preventDefault();
121 this.$.storageDriveCache.open(); 123 this.$.storageDriveCache.open();
122 }, 124 },
123 125
124 /** 126 /**
125 * Handler for tapping the "Browsing data" item. 127 * Handler for tapping the "Browsing data" item.
126 * @private 128 * @private
127 */ 129 */
128 onBrowsingDataTap_: function() { 130 onBrowsingDataTap_: function() {
129 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA); 131 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA);
130 }, 132 },
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 switch (spaceState) { 275 switch (spaceState) {
274 case settings.StorageSpaceState.LOW: 276 case settings.StorageSpaceState.LOW:
275 return 'space-low'; 277 return 'space-low';
276 case settings.StorageSpaceState.CRITICALLY_LOW: 278 case settings.StorageSpaceState.CRITICALLY_LOW:
277 return 'space-critically-low'; 279 return 'space-critically-low';
278 default: 280 default:
279 return ''; 281 return '';
280 } 282 }
281 }, 283 },
282 }); 284 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698