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

Unified Diff: Source/devtools/front_end/audits/AuditLauncherView.js

Issue 614323003: DevTools: enable by default disableAgentsWhenProfile experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: unnecessary line was removed Created 6 years, 2 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
Index: Source/devtools/front_end/audits/AuditLauncherView.js
diff --git a/Source/devtools/front_end/audits/AuditLauncherView.js b/Source/devtools/front_end/audits/AuditLauncherView.js
index ff5e87bf053cf4286328158d01e7412c5c63713b..b418eba4b9c181cba3883e1647fad60937498d69 100644
--- a/Source/devtools/front_end/audits/AuditLauncherView.js
+++ b/Source/devtools/front_end/audits/AuditLauncherView.js
@@ -62,7 +62,6 @@ WebInspector.AuditLauncherView = function(auditController)
WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this);
WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, WebInspector.NetworkManager.EventTypes.RequestFinished, this._onRequestFinished, this);
- WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.StateChanged, this._updateButton, this);
var defaultSelectedAuditCategory = {};
defaultSelectedAuditCategory[WebInspector.AuditLauncherView.AllCategoriesKey] = true;
@@ -141,13 +140,10 @@ WebInspector.AuditLauncherView.prototype = {
this._auditRunning = auditRunning;
this._updateButton();
this._toggleUIComponents(this._auditRunning);
- if (this._auditRunning) {
- WebInspector.profilingLock().acquire();
+ if (this._auditRunning)
this._startAudit();
- } else {
+ else
this._stopAudit();
- WebInspector.profilingLock().release();
- }
},
_startAudit: function()
@@ -324,10 +320,8 @@ WebInspector.AuditLauncherView.prototype = {
_updateButton: function()
{
- var enable = this._auditRunning || (this._currentCategoriesCount && !WebInspector.profilingLock().isAcquired());
this._launchButton.textContent = this._auditRunning ? WebInspector.UIString("Stop") : WebInspector.UIString("Run");
- this._launchButton.disabled = !enable;
- this._launchButton.title = enable ? "" : WebInspector.anotherProfilerActiveLabel();
+ this._launchButton.disabled = !this._currentCategoriesCount;
},
__proto__: WebInspector.VBox.prototype

Powered by Google App Engine
This is Rietveld 408576698