Commit 547cbfbc authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Favor search results from the network

Files not from the filesystem, or not with green dots, are way more
likely to be relevant to the user.

Bug: 806225
Change-Id: I59e9727cf336299a459323a8357c3c242d965034
Reviewed-on: https://chromium-review.googlesource.com/c/1359468Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613395}
parent f6d76a4f
......@@ -52,6 +52,12 @@ Sources.SourcesSearchScope = class {
return -1;
if (!uiSourceCode1.isDirty() && uiSourceCode2.isDirty())
return 1;
const isFileSystem1 = uiSourceCode1.project().type() === Workspace.projectTypes.FileSystem &&
!Persistence.persistence.binding(uiSourceCode1);
const isFileSystem2 = uiSourceCode2.project().type() === Workspace.projectTypes.FileSystem &&
!Persistence.persistence.binding(uiSourceCode2);
if (isFileSystem1 !== isFileSystem2)
return isFileSystem1 ? 1 : -1;
const url1 = uiSourceCode1.url();
const url2 = uiSourceCode2.url();
if (url1 && !url2)
......
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