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

Issue 11377049: Moving prepopulated search engines to a JSON file. (Closed)

Created:
8 years, 1 month ago by beaudoin
Modified:
8 years, 1 month ago
CC:
chromium-reviews, pam+watch_chromium.org, M-A Ruel
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Moving prepopulated search engines to a JSON file. This CL also includes the python script required to convert the JSON file to a .cc/.h pair. The generated .cc/.h are not generated by the build process and must be committed to the repository. BUG=159990 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167793 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=168430

Patch Set 1 #

Total comments: 9

Patch Set 2 : Answered review comments. #

Total comments: 8

Patch Set 3 : Ready for thorough review #

Total comments: 62

Patch Set 4 : Unit tests for python and C++. Added build step. #

Total comments: 26

Patch Set 5 : Answered review comments. #

Total comments: 8

Patch Set 6 : Minor clean-up and more robust unit test. #

Total comments: 1

Patch Set 7 : Fixed failing build on windows and Peter's nits. #

Patch Set 8 : Fix for failure on win and cros builders. #

Patch Set 9 : Getting rid of windows backslashes this time. #

Patch Set 10 : Rebased to fix conflict. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2500 lines, -2431 lines) Patch
A build/json_to_struct.gypi View 1 2 3 4 5 6 7 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/search_engines/prepopulated_engines.gyp View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/search_engines/prepopulated_engines.json View 1 2 3 4 1 chunk +1724 lines, -0 lines 0 comments Download
A chrome/browser/search_engines/prepopulated_engines_schema.json View 1 2 3 4 1 chunk +63 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_prepopulate_data.cc View 1 2 3 6 chunks +9 lines, -2429 lines 0 comments Download
M chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +37 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A + tools/json_to_struct/PRESUBMIT.py View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A tools/json_to_struct/element_generator.py View 1 2 3 4 5 6 1 chunk +121 lines, -0 lines 0 comments Download
A tools/json_to_struct/element_generator_test.py View 1 2 3 4 5 6 1 chunk +158 lines, -0 lines 0 comments Download
A tools/json_to_struct/json_to_struct.py View 1 2 3 4 5 6 7 8 1 chunk +211 lines, -0 lines 0 comments Download
A tools/json_to_struct/struct_generator.py View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
A tools/json_to_struct/struct_generator_test.py View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
beaudoin
Hi Peter! Here is an initial version of the script, JSON and generated .cc/.h to ...
8 years, 1 month ago (2012-11-08 05:46:04 UTC) #1
beaudoin
On 2012/11/08 05:46:04, beaudoin wrote: > Hi Peter! > > Here is an initial version ...
8 years, 1 month ago (2012-11-08 05:48:25 UTC) #2
Peter Kasting
I'd like to see what Google looks like converted as well. You should probably move ...
8 years, 1 month ago (2012-11-08 19:02:25 UTC) #3
beaudoin
Hi Peter, (At a conf. today, no time for code so only comments for now.) ...
8 years, 1 month ago (2012-11-08 19:39:01 UTC) #4
Peter Kasting
The ultimate goal is long-term readability and maintainability. So "big change from what we do ...
8 years, 1 month ago (2012-11-08 19:42:40 UTC) #5
beaudoin
On 2012/11/08 19:42:40, Peter Kasting wrote: > The ultimate goal is long-term readability and maintainability. ...
8 years, 1 month ago (2012-11-08 19:47:18 UTC) #6
beaudoin
Here's a second version that answer your review comments. Since you seemed to agree with ...
8 years, 1 month ago (2012-11-09 04:16:53 UTC) #7
Peter Kasting
http://codereview.chromium.org/11377049/diff/7003/chrome/browser/search_engines/prepopulated_engines.json File chrome/browser/search_engines/prepopulated_engines.json (right): http://codereview.chromium.org/11377049/diff/7003/chrome/browser/search_engines/prepopulated_engines.json#newcode23 chrome/browser/search_engines/prepopulated_engines.json:23: // Increment this if you change the above data ...
8 years, 1 month ago (2012-11-09 22:07:23 UTC) #8
beaudoin
This latest patch answers your review comments, including moving the alternate_urls to a JSON array. ...
8 years, 1 month ago (2012-11-10 09:17:54 UTC) #9
beaudoin
@ben For chrome/chrome_browser.gypi Hi Benjamin, I've added you as a reviewer because I saw you ...
8 years, 1 month ago (2012-11-10 09:28:21 UTC) #10
Ben Goodger (Google)
lgtm for gyp
8 years, 1 month ago (2012-11-12 16:57:54 UTC) #11
not at google - send to devlin
Sure. Here is first pass, just some basic things with overall questions. http://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.json File chrome/browser/search_engines/prepopulated_engines.json ...
8 years, 1 month ago (2012-11-12 18:38:13 UTC) #12
Peter Kasting
http://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc File chrome/browser/search_engines/prepopulated_engines.cc (right): http://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc#newcode10 chrome/browser/search_engines/prepopulated_engines.cc:10: #include <stdio.h> Why is this needed? http://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc#newcode18 chrome/browser/search_engines/prepopulated_engines.cc:18: const ...
8 years, 1 month ago (2012-11-12 22:46:36 UTC) #13
beaudoin
Answered comments, added python and C++ unit tests, added a build step so prepopulated_engines.h/cc are ...
8 years, 1 month ago (2012-11-13 18:44:26 UTC) #14
beaudoin
(One more small comment/question to Peter regarding NULL + size_t.) https://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc File chrome/browser/search_engines/prepopulated_engines.cc (right): https://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc#newcode10 ...
8 years, 1 month ago (2012-11-13 18:51:13 UTC) #15
Peter Kasting
https://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc File chrome/browser/search_engines/prepopulated_engines.cc (right): https://codereview.chromium.org/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines.cc#newcode10 chrome/browser/search_engines/prepopulated_engines.cc:10: #include <stdio.h> On 2012/11/13 18:51:13, beaudoin wrote: > On ...
8 years, 1 month ago (2012-11-13 19:23:10 UTC) #16
not at google - send to devlin
Generally speaking: prefer OO style than util-method style. It's easier to see how components fit ...
8 years, 1 month ago (2012-11-13 20:28:07 UTC) #17
not at google - send to devlin
https://chromiumcodereview.appspot.com/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines_schema.json File chrome/browser/search_engines/prepopulated_engines_schema.json (right): https://chromiumcodereview.appspot.com/11377049/diff/12001/chrome/browser/search_engines/prepopulated_engines_schema.json#newcode15 chrome/browser/search_engines/prepopulated_engines_schema.json:15: { "field": "name", "type": "string16" }, On 2012/11/13 20:28:07, ...
8 years, 1 month ago (2012-11-13 20:34:56 UTC) #18
beaudoin
Getting closer to wrapping this one! ben@ : Still missing a rubberstamp for the new ...
8 years, 1 month ago (2012-11-13 21:42:03 UTC) #19
not at google - send to devlin
lgtm https://codereview.chromium.org/11377049/diff/3003/build/json_to_struct.gypi File build/json_to_struct.gypi (right): https://codereview.chromium.org/11377049/diff/3003/build/json_to_struct.gypi#newcode8 build/json_to_struct.gypi:8: # json_schema_file: a json file that comprise the ...
8 years, 1 month ago (2012-11-13 22:12:05 UTC) #20
Peter Kasting
LGTM with caveat https://codereview.chromium.org/11377049/diff/1011/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc File chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc (right): https://codereview.chromium.org/11377049/diff/1011/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc#newcode183 chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc:183: TEST(TemplateURLPrepopulateDataTest, ProvidersFromPrepopulated) { This test is ...
8 years, 1 month ago (2012-11-13 22:42:45 UTC) #21
beaudoin
https://codereview.chromium.org/11377049/diff/3003/build/json_to_struct.gypi File build/json_to_struct.gypi (right): https://codereview.chromium.org/11377049/diff/3003/build/json_to_struct.gypi#newcode8 build/json_to_struct.gypi:8: # json_schema_file: a json file that comprise the structure ...
8 years, 1 month ago (2012-11-14 17:34:11 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/11377049/10019
8 years, 1 month ago (2012-11-14 17:34:36 UTC) #23
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-14 17:53:06 UTC) #24
Peter Kasting
https://codereview.chromium.org/11377049/diff/10019/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc File chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc (right): https://codereview.chromium.org/11377049/diff/10019/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc#newcode194 chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc:194: ASSERT_GT(t_urls.size(), 0u); Nit: Or ASSERT_FALSE(t_urls.empty()), and similar on all ...
8 years, 1 month ago (2012-11-14 18:09:48 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/11377049/15020
8 years, 1 month ago (2012-11-14 21:07:07 UTC) #26
commit-bot: I haz the power
Change committed as 167793
8 years, 1 month ago (2012-11-15 00:37:35 UTC) #27
beaudoin
On 2012/11/15 00:37:35, I haz the power (commit-bot) wrote: > Change committed as 167793 Fix: ...
8 years, 1 month ago (2012-11-16 17:10:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/11377049/19001
8 years, 1 month ago (2012-11-16 17:11:19 UTC) #29
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-16 17:31:48 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/11377049/18007
8 years, 1 month ago (2012-11-16 18:29:25 UTC) #31
commit-bot: I haz the power
Retried try job too often for step(s) sync_integration_tests
8 years, 1 month ago (2012-11-17 02:13:38 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/11377049/21003
8 years, 1 month ago (2012-11-17 02:32:41 UTC) #33
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-17 12:25:00 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/beaudoin@chromium.org/11377049/21003
8 years, 1 month ago (2012-11-17 13:28:56 UTC) #35
commit-bot: I haz the power
8 years, 1 month ago (2012-11-17 14:20:31 UTC) #36
Change committed as 168430

Powered by Google App Engine
This is Rietveld 408576698