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

Unified Diff: Source/devtools/front_end/ProfilesPanel.js

Issue 23609064: Make "three snapshot technique" work on heap snapshots loaded from files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/JSHeapSnapshot.js ('k') | Source/devtools/front_end/ProfilesPanelDescriptor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ProfilesPanel.js
diff --git a/Source/devtools/front_end/ProfilesPanel.js b/Source/devtools/front_end/ProfilesPanel.js
index 9088f37355b42e3626d14ffa39f5765cfad526d8..aafd6fe7901244af183738090b900a06cb6fa7d1 100644
--- a/Source/devtools/front_end/ProfilesPanel.js
+++ b/Source/devtools/front_end/ProfilesPanel.js
@@ -23,8 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-const UserInitiatedProfileName = "org.webkit.profiles.user-initiated";
-
/**
* @constructor
* @extends {WebInspector.Object}
@@ -513,7 +511,10 @@ WebInspector.ProfilesPanel.prototype = {
return;
}
- var temporaryProfile = profileType.createTemporaryProfile(WebInspector.ProfilesPanelDescriptor.UserInitiatedProfileName + "." + file.name);
+ var name = file.name;
+ if (name.endsWith(profileType.fileExtension()))
+ name = name.substr(0, name.length - profileType.fileExtension().length);
+ var temporaryProfile = profileType.createTemporaryProfile(name);
temporaryProfile.setFromFile();
profileType.addProfile(temporaryProfile);
temporaryProfile.loadFromFile(file);
@@ -701,7 +702,7 @@ WebInspector.ProfilesPanel.prototype = {
var small = false;
var alternateTitle;
- if (!WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(profile.title) && !profile.isTemporary) {
+ if (!profile.fromFile() && !profile.isTemporary) {
var profileTitleKey = this._makeTitleKey(profile.title, typeId);
if (!(profileTitleKey in this._profileGroups))
this._profileGroups[profileTitleKey] = [];
@@ -1230,12 +1231,7 @@ WebInspector.ProfileSidebarTreeElement = function(profile, titleFormat, classNam
{
this.profile = profile;
this._titleFormat = titleFormat;
-
- if (WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(this.profile.title))
- this._profileNumber = WebInspector.ProfilesPanelDescriptor.userInitiatedProfileIndex(this.profile.title);
-
WebInspector.SidebarTreeElement.call(this, className, "", "", profile, false);
-
this.refreshTitles();
}
@@ -1256,8 +1252,6 @@ WebInspector.ProfileSidebarTreeElement.prototype = {
{
if (this._mainTitle)
return this._mainTitle;
- if (WebInspector.ProfilesPanelDescriptor.isUserInitiatedProfile(this.profile.title))
- return WebInspector.UIString(this._titleFormat, this._profileNumber);
return this.profile.title;
},
« no previous file with comments | « Source/devtools/front_end/JSHeapSnapshot.js ('k') | Source/devtools/front_end/ProfilesPanelDescriptor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698