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

Side by Side Diff: Source/devtools/front_end/profiler/ProfilesPanel.js

Issue 297143011: Fix duplicate extensions in the profile loading error message (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 _loadFromFile: function(file) 576 _loadFromFile: function(file)
577 { 577 {
578 this._createFileSelectorElement(); 578 this._createFileSelectorElement();
579 579
580 var profileType = this._findProfileTypeByExtension(file.name); 580 var profileType = this._findProfileTypeByExtension(file.name);
581 if (!profileType) { 581 if (!profileType) {
582 var extensions = []; 582 var extensions = [];
583 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes() ; 583 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes() ;
584 for (var i = 0; i < types.length; i++) { 584 for (var i = 0; i < types.length; i++) {
585 var extension = types[i].fileExtension(); 585 var extension = types[i].fileExtension();
586 if (!extension) 586 if (!extension || extensions.indexOf(extension) !== -1)
587 continue; 587 continue;
588 extensions.push(extension); 588 extensions.push(extension);
589 } 589 }
590 WebInspector.console.log(WebInspector.UIString("Can't load file. Onl y files with extensions '%s' can be loaded.", extensions.join("', '"))); 590 WebInspector.console.log(WebInspector.UIString("Can't load file. Onl y files with extensions '%s' can be loaded.", extensions.join("', '")));
591 return; 591 return;
592 } 592 }
593 593
594 if (!!profileType.profileBeingRecorded()) { 594 if (!!profileType.profileBeingRecorded()) {
595 WebInspector.console.log(WebInspector.UIString("Can't load profile w hen other profile is recording.")); 595 WebInspector.console.log(WebInspector.UIString("Can't load profile w hen other profile is recording."));
596 return; 596 return;
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 importScript("HeapSnapshotCommon.js"); 1338 importScript("HeapSnapshotCommon.js");
1339 importScript("HeapSnapshotProxy.js"); 1339 importScript("HeapSnapshotProxy.js");
1340 importScript("HeapSnapshotDataGrids.js"); 1340 importScript("HeapSnapshotDataGrids.js");
1341 importScript("HeapSnapshotGridNodes.js"); 1341 importScript("HeapSnapshotGridNodes.js");
1342 importScript("HeapSnapshotView.js"); 1342 importScript("HeapSnapshotView.js");
1343 importScript("ProfileLauncherView.js"); 1343 importScript("ProfileLauncherView.js");
1344 importScript("CanvasProfileView.js"); 1344 importScript("CanvasProfileView.js");
1345 importScript("CanvasReplayStateView.js"); 1345 importScript("CanvasReplayStateView.js");
1346 1346
1347 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry (); 1347 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry ();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698