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

Side by Side Diff: Source/devtools/front_end/sources/SourcesSearchScope.js

Issue 400673002: DevTools: Fix dirty files handling in search across all files. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/http/tests/inspector/search/sources-search-scope-in-files-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 _processMatchingFilesForProject: function(searchId, project, filesMathingFil eQuery, progress, callback, files) 151 _processMatchingFilesForProject: function(searchId, project, filesMathingFil eQuery, progress, callback, files)
152 { 152 {
153 if (searchId !== this._searchId) { 153 if (searchId !== this._searchId) {
154 this._searchFinishedCallback(false); 154 this._searchFinishedCallback(false);
155 return; 155 return;
156 } 156 }
157 157
158 files = files.sort(String.naturalOrderComparator); 158 files = files.sort(String.naturalOrderComparator);
159 files = files.intersectOrdered(filesMathingFileQuery, String.naturalOrde rComparator); 159 files = files.intersectOrdered(filesMathingFileQuery, String.naturalOrde rComparator);
160 var dirtyFiles = this._projectFilesMatchingFileQuery(project, this._sear chConfig, true); 160 var dirtyFiles = this._projectFilesMatchingFileQuery(project, this._sear chConfig, true);
161 files = files.mergeOrdered(dirtyFiles); 161 files = files.mergeOrdered(dirtyFiles, String.naturalOrderComparator);
162 162
163 if (!files.length) { 163 if (!files.length) {
164 progress.done(); 164 progress.done();
165 callback(); 165 callback();
166 return; 166 return;
167 } 167 }
168 168
169 progress.setTotalWork(files.length); 169 progress.setTotalWork(files.length);
170 170
171 var fileIndex = 0; 171 var fileIndex = 0;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 /** 266 /**
267 * @param {!WebInspector.ProjectSearchConfig} searchConfig 267 * @param {!WebInspector.ProjectSearchConfig} searchConfig
268 * @return {!WebInspector.FileBasedSearchResultsPane} 268 * @return {!WebInspector.FileBasedSearchResultsPane}
269 */ 269 */
270 createSearchResultsPane: function(searchConfig) 270 createSearchResultsPane: function(searchConfig)
271 { 271 {
272 return new WebInspector.FileBasedSearchResultsPane(searchConfig); 272 return new WebInspector.FileBasedSearchResultsPane(searchConfig);
273 } 273 }
274 } 274 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/search/sources-search-scope-in-files-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698