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

Issue 9836100: Add full text regex searching to chrome://sync (Closed)

Created:
8 years, 9 months ago by rlarocque
Modified:
8 years, 8 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), arv (Not doing code reviews), akalin
Visibility:
Public.

Description

Add full text regex searching to chrome://sync The search tab of chrome://sync would previously perform a string search of a select set of fields. This change modifies the search behaviour to instead perform a regex match against a serialized version of the node. Part of this change is to move the searching function out of C++ and into JavaScript. When a search is performed, all nodes are loaded from the database, marshalled, and sent over the fence to the JavaScript side of things. This comes with a significant performance cost, but it's not much worse than a search matching all nodes would have been under the old system. While there was no such thing as an invalid search string under the old system, it is possible to enter an invalid regex. This change adds some logic to alert the user if their search query is not a valid regex (ie. if it ends with a backslash). In order to make it easier to formulate queries, the way we display results has been changed. The right pane will now display the serialization of the raw node (which exactly reflects the text that was searched) rather than the "details" used in the old system. This new format is a subset of the old, and corresponds to the dictionary value found under "entry" in the old display. Finally, this change removes support for some JavaScript calls that are no longer used. This change fixes JavaScript style-checker issues in the files that it touches. BUG=104574, 122021 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132259

Patch Set 1 #

Total comments: 15

Patch Set 2 : Clean up rough edges #

Total comments: 8

Patch Set 3 : Review fixes + unit test #

Total comments: 12

Patch Set 4 : Fixes from JS review #

Total comments: 2

Patch Set 5 : Unit test review fixes #

Patch Set 6 : Rebase #

Patch Set 7 : Fix style checker warnings #

Patch Set 8 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -117 lines) Patch
M chrome/browser/resources/sync_internals/chrome_sync.js View 1 2 3 4 5 6 7 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/resources/sync_internals/sync_search.css View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/resources/sync_internals/sync_search.js View 1 2 3 4 5 6 4 chunks +36 lines, -32 lines 0 comments Download
M chrome/browser/sync/internal_api/sync_manager.cc View 1 2 3 4 5 4 chunks +23 lines, -37 lines 0 comments Download
M chrome/browser/sync/internal_api/syncapi_unittest.cc View 1 2 3 4 5 1 chunk +40 lines, -1 line 0 comments Download
M sync/syncable/syncable.h View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M sync/syncable/syncable.cc View 1 2 3 4 5 1 chunk +0 lines, -30 lines 0 comments Download
M sync/syncable/syncable_id.h View 1 chunk +0 lines, -3 lines 0 comments Download
M sync/syncable/syncable_id.cc View 2 chunks +0 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
rlarocque
This change is half-baked, but I wanted to get your initial impressions before you go ...
8 years, 9 months ago (2012-03-27 01:43:41 UTC) #1
rlarocque
Note some limitations of the current patch. http://codereview.chromium.org/9836100/diff/1/chrome/browser/resources/sync_internals/sync_search.js File chrome/browser/resources/sync_internals/sync_search.js (right): http://codereview.chromium.org/9836100/diff/1/chrome/browser/resources/sync_internals/sync_search.js#newcode24 chrome/browser/resources/sync_internals/sync_search.js:24: return JSON.stringify(elem).match(regex); ...
8 years, 9 months ago (2012-03-27 01:49:04 UTC) #2
tim (not reviewing)
On 2012/03/27 01:49:04, rlarocque wrote: > Note some limitations of the current patch. > > ...
8 years, 9 months ago (2012-03-27 17:36:48 UTC) #3
akalin
Initial high-level comments http://codereview.chromium.org/9836100/diff/1/chrome/browser/resources/sync_internals/sync_index.html File chrome/browser/resources/sync_internals/sync_index.html (right): http://codereview.chromium.org/9836100/diff/1/chrome/browser/resources/sync_internals/sync_index.html#newcode15 chrome/browser/resources/sync_internals/sync_index.html:15: <script src="chrome://resources/js/event_tracker.js"></script> this is part of ...
8 years, 8 months ago (2012-03-29 18:41:42 UTC) #4
rlarocque
Thanks for the input. I'll try to clean this up a bit and fix some ...
8 years, 8 months ago (2012-03-29 20:51:32 UTC) #5
rlarocque
This revision fixes a few things. TL;DR: Following this change, what you see is what ...
8 years, 8 months ago (2012-03-30 21:52:30 UTC) #6
akalin
took a quick look, this LGTM. may want to get a once-over from someone else ...
8 years, 8 months ago (2012-04-03 00:36:07 UTC) #7
rlarocque
I wasn't expecting a full review yet, but thanks! I've addressed your comments and added ...
8 years, 8 months ago (2012-04-03 19:01:41 UTC) #8
Andrew T Wilson (Slow)
http://codereview.chromium.org/9836100/diff/11005/chrome/browser/resources/sync_internals/sync_search.css File chrome/browser/resources/sync_internals/sync_search.css (right): http://codereview.chromium.org/9836100/diff/11005/chrome/browser/resources/sync_internals/sync_search.css#newcode10 chrome/browser/resources/sync_internals/sync_search.css:10: background-color: #FAA; Apparently css style guide says we should ...
8 years, 8 months ago (2012-04-06 20:30:57 UTC) #9
rlarocque
Thanks for the review. http://codereview.chromium.org/9836100/diff/11005/chrome/browser/resources/sync_internals/sync_search.css File chrome/browser/resources/sync_internals/sync_search.css (right): http://codereview.chromium.org/9836100/diff/11005/chrome/browser/resources/sync_internals/sync_search.css#newcode10 chrome/browser/resources/sync_internals/sync_search.css:10: background-color: #FAA; On 2012/04/06 20:30:57, ...
8 years, 8 months ago (2012-04-07 00:58:04 UTC) #10
rlarocque
Whoops, forgot to upload the changes last Friday. They're uploaded now. Tim: It looks like ...
8 years, 8 months ago (2012-04-09 21:21:25 UTC) #11
tim (not reviewing)
A couple nits, then test LGTM http://codereview.chromium.org/9836100/diff/19001/chrome/browser/sync/internal_api/syncapi_unittest.cc File chrome/browser/sync/internal_api/syncapi_unittest.cc (right): http://codereview.chromium.org/9836100/diff/19001/chrome/browser/sync/internal_api/syncapi_unittest.cc#newcode1234 chrome/browser/sync/internal_api/syncapi_unittest.cc:1234: ASSERT_EQ(return_args.Get().GetSize(), static_cast<size_t>(1)); Here ...
8 years, 8 months ago (2012-04-12 01:22:08 UTC) #12
rlarocque
Thanks. Unit tests updated. http://codereview.chromium.org/9836100/diff/19001/chrome/browser/sync/internal_api/syncapi_unittest.cc File chrome/browser/sync/internal_api/syncapi_unittest.cc (right): http://codereview.chromium.org/9836100/diff/19001/chrome/browser/sync/internal_api/syncapi_unittest.cc#newcode1234 chrome/browser/sync/internal_api/syncapi_unittest.cc:1234: ASSERT_EQ(return_args.Get().GetSize(), static_cast<size_t>(1)); On 2012/04/12 01:22:08, ...
8 years, 8 months ago (2012-04-12 02:27:19 UTC) #13
Andrew T Wilson (Slow)
LGTM
8 years, 8 months ago (2012-04-13 00:37:16 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9836100/29001
8 years, 8 months ago (2012-04-13 01:04:01 UTC) #15
commit-bot: I haz the power
Presubmit check for 9836100-29001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 8 months ago (2012-04-13 01:04:08 UTC) #16
rlarocque
It turns out those warnings are not informative only. I was hoping to ignore them ...
8 years, 8 months ago (2012-04-13 17:29:57 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9836100/46001
8 years, 8 months ago (2012-04-13 18:20:11 UTC) #18
commit-bot: I haz the power
8 years, 8 months ago (2012-04-13 20:41:13 UTC) #19
Change committed as 132259

Powered by Google App Engine
This is Rietveld 408576698