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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineLoader.js

Issue 2040563002: Remove FileError interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fe-dep
Patch Set: handleEvent -> invoke and other review nits Created 4 years, 5 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 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 * @constructor 6 * @constructor
7 * @implements {WebInspector.OutputStream} 7 * @implements {WebInspector.OutputStream}
8 * @implements {WebInspector.OutputStreamDelegate} 8 * @implements {WebInspector.OutputStreamDelegate}
9 * @param {!WebInspector.TracingModel} model 9 * @param {!WebInspector.TracingModel} model
10 * @param {!WebInspector.TimelineLifecycleDelegate} delegate 10 * @param {!WebInspector.TimelineLifecycleDelegate} delegate
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 */ 207 */
208 onTransferFinished: function() {}, 208 onTransferFinished: function() {},
209 209
210 /** 210 /**
211 * @override 211 * @override
212 * @param {!WebInspector.ChunkedReader} reader 212 * @param {!WebInspector.ChunkedReader} reader
213 * @param {!Event} event 213 * @param {!Event} event
214 */ 214 */
215 onError: function(reader, event) 215 onError: function(reader, event)
216 { 216 {
217 switch (event.target.error.code) { 217 switch (event.target.error.name) {
pfeldman 2016/07/12 21:29:44 Was name previously available? If not, you would n
jsbell 2016/07/13 16:55:07 Yes; FileError started inheriting from DOMError ci
218 case FileError.NOT_FOUND_ERR: 218 case 'NotFoundError':
219 this._reportErrorAndCancelLoading(WebInspector.UIString("File \"%s\" not found.", reader.fileName())); 219 this._reportErrorAndCancelLoading(WebInspector.UIString("File \"%s\" not found.", reader.fileName()));
220 break; 220 break;
221 case FileError.NOT_READABLE_ERR: 221 case 'NotReadableError':
222 this._reportErrorAndCancelLoading(WebInspector.UIString("File \"%s\" is not readable", reader.fileName())); 222 this._reportErrorAndCancelLoading(WebInspector.UIString("File \"%s\" is not readable", reader.fileName()));
223 break; 223 break;
224 case FileError.ABORT_ERR: 224 case 'AbortError':
225 break; 225 break;
226 default: 226 default:
227 this._reportErrorAndCancelLoading(WebInspector.UIString("An error oc curred while reading the file \"%s\"", reader.fileName())); 227 this._reportErrorAndCancelLoading(WebInspector.UIString("An error oc curred while reading the file \"%s\"", reader.fileName()));
228 } 228 }
229 } 229 }
230 } 230 }
231 231
232 /** 232 /**
233 * @constructor 233 * @constructor
234 * @implements {WebInspector.OutputStreamDelegate} 234 * @implements {WebInspector.OutputStreamDelegate}
(...skipping 23 matching lines...) Expand all
258 * @override 258 * @override
259 * @param {!WebInspector.ChunkedReader} reader 259 * @param {!WebInspector.ChunkedReader} reader
260 * @param {!Event} event 260 * @param {!Event} event
261 */ 261 */
262 onError: function(reader, event) 262 onError: function(reader, event)
263 { 263 {
264 var error = event.target.error; 264 var error = event.target.error;
265 WebInspector.console.error(WebInspector.UIString("Failed to save timelin e: %s (%s, %s)", error.message, error.name, error.code)); 265 WebInspector.console.error(WebInspector.UIString("Failed to save timelin e: %s (%s, %s)", error.message, error.name, error.code));
266 } 266 }
267 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698