Commit 51062728 authored by Eugene Ostroukhov's avatar Eugene Ostroukhov Committed by Commit Bot

DevTools: network search behind the experiment

1. Disable search extension.
2. Do not show search prompt in the Network log
3. Hide serch type selection when there's no meaningful choice.

Bug: 468416
Change-Id: I461b84719a804da7bf53c94a3392d8123f9d15c5
Reviewed-on: https://chromium-review.googlesource.com/962662Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543175}
parent 3d437c12
......@@ -166,6 +166,8 @@ Network.NetworkLogView = class extends UI.VBox {
}
_createSearchPrompt() {
if (!Runtime.experiments.isEnabled('networkSearch'))
return null;
const text = this._searchHint.contentElement.createChild('div', 'search-button');
text.createChild('span').textContent = ls`Search headers and response bodies for `;
const filterString = text.createChild('strong');
......@@ -1839,6 +1841,8 @@ Network.NetworkLogView = class extends UI.VBox {
}
_updateSearchPrompt() {
if (!Runtime.experiments.isEnabled('networkSearch'))
return;
const filterString = this._filterBar.visible() ? this._textFilterUI.value() : '';
if (filterString.length) {
const filterBarElement = this._filterBar.element;
......
......@@ -123,6 +123,7 @@
{
"type": "@Search.SearchScope",
"id": "network.searchInNetwork",
"experiment": "networkSearch",
"className": "Network.NetworkSearchScope",
"title": "Network",
"description": "Search headers and response bodies"
......
......@@ -78,6 +78,9 @@ Search.SearchView = class extends UI.VBox {
this._searchScopes = new Map();
this._defaultScope = Search.SearchView._readScopesExtenstions(this._scopesSelector, this._searchScopes);
if (this._searchScopes.size < 2)
this._scopesSelector.hideWidget();
this._load();
/** @type {?Search.SearchScope} */
this._searchScope = null;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment