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

Unified Diff: Source/devtools/front_end/sdk/CSSStyleModel.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/sdk/CSSStyleModel.js
diff --git a/Source/devtools/front_end/sdk/CSSStyleModel.js b/Source/devtools/front_end/sdk/CSSStyleModel.js
index 5701026368e014d36e9eb5fa4d2f8e957b203868..b90ae9040fee9e4ee27e5670c2649065ae762196 100644
--- a/Source/devtools/front_end/sdk/CSSStyleModel.js
+++ b/Source/devtools/front_end/sdk/CSSStyleModel.js
@@ -49,9 +49,6 @@ WebInspector.CSSStyleModel = function(target)
this._styleSheetIdToHeader = new StringMap();
/** @type {!StringMap.<!Object.<!PageAgent.FrameId, !Array.<!CSSAgent.StyleSheetId>>>} */
this._styleSheetIdsForURL = new StringMap();
-
- if (Runtime.experiments.isEnabled("disableAgentsWhenProfile"))
- WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.StateChanged, this._profilingStateChanged, this);
}
WebInspector.CSSStyleModel.PseudoStatePropertyName = "pseudoState";
@@ -83,15 +80,16 @@ WebInspector.CSSStyleModel.Events = {
WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld", "print", "projection", "screen", "speech", "tty", "tv"];
WebInspector.CSSStyleModel.prototype = {
- _profilingStateChanged: function()
+ suspendModel: function()
{
- if (WebInspector.profilingLock().isAcquired()) {
- this._agent.disable();
- this._isEnabled = false;
- this._resetStyleSheets();
- } else {
- this._agent.enable(this._wasEnabled.bind(this));
- }
+ this._agent.disable();
+ this._isEnabled = false;
+ this._resetStyleSheets();
+ },
+
+ resumeModel: function()
+ {
+ this._agent.enable(this._wasEnabled.bind(this));
},
/**

Powered by Google App Engine
This is Rietveld 408576698