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

Issue 426653002: Import keywords for search engines imported from Firefox (Closed)

Created:
6 years, 4 months ago by Nikhil
Modified:
6 years, 4 months ago
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

This patch parses search-metadata.json that is used to store keywords for search engines in Firefox. GetSearchEnginesXMLDataFromJSON() is modified to parse search-metadata.json also and include keyword information in xml string. BUG=52344 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290518

Patch Set 1 #

Total comments: 31

Patch Set 2 : Review comments #

Total comments: 10

Patch Set 3 : Review comment (track keyword in TemplateURLParsingContext) #

Total comments: 7

Patch Set 4 : Added test case #

Total comments: 16

Patch Set 5 : Review comment (modified test case) #

Patch Set 6 : Review comment (modified test case, reduced search.json) #

Total comments: 8

Patch Set 7 : Review feedback (modified test cases - both new and old) #

Total comments: 14

Patch Set 8 : Review feedback (use const refs) #

Patch Set 9 : Review feedback (expand KeywordInfo struct) #

Total comments: 15

Patch Set 10 : Review feedback (nit fixes) #

Total comments: 2

Patch Set 11 : Review feedback (two nit fixes) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -36 lines) Patch
M chrome/browser/importer/firefox_importer_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +44 lines, -33 lines 0 comments Download
A chrome/test/data/firefox_profile/search-metadata.json View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/utility/importer/firefox_importer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +28 lines, -0 lines 0 comments Download
M components/search_engines/template_url_parser.cc View 1 2 3 8 chunks +20 lines, -3 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Nikhil
PTAL at my prosposed solution to import keywords for search engines imported from Firefox (v3.5 ...
6 years, 4 months ago (2014-07-28 14:25:26 UTC) #1
Ilya Sherman
Thanks, Nikhil. Could you please add test coverage? Also, +pkasting for the changes to search_engines ...
6 years, 4 months ago (2014-07-28 22:18:45 UTC) #2
Peter Kasting
https://codereview.chromium.org/426653002/diff/1/chrome/utility/importer/firefox_importer.cc File chrome/utility/importer/firefox_importer.cc (right): https://codereview.chromium.org/426653002/diff/1/chrome/utility/importer/firefox_importer.cc#newcode491 chrome/utility/importer/firefox_importer.cc:491: const base::DictionaryValue* search_metadata_root = NULL; On 2014/07/28 22:18:45, Ilya ...
6 years, 4 months ago (2014-07-28 22:48:31 UTC) #3
Nikhil
Thanks for taking a look at this. I've made changes as per review comments. PTAL. ...
6 years, 4 months ago (2014-07-29 08:29:21 UTC) #4
Ilya Sherman
Thanks! This looks great, other than the missing tests :) https://codereview.chromium.org/426653002/diff/1/chrome/utility/importer/firefox_importer.cc File chrome/utility/importer/firefox_importer.cc (right): https://codereview.chromium.org/426653002/diff/1/chrome/utility/importer/firefox_importer.cc#newcode584 ...
6 years, 4 months ago (2014-07-29 17:24:56 UTC) #5
Peter Kasting
https://codereview.chromium.org/426653002/diff/1/chrome/utility/importer/firefox_importer.cc File chrome/utility/importer/firefox_importer.cc (right): https://codereview.chromium.org/426653002/diff/1/chrome/utility/importer/firefox_importer.cc#newcode584 chrome/utility/importer/firefox_importer.cc:584: file_path, &search_xml_path)) { On 2014/07/29 17:24:55, Ilya Sherman wrote: ...
6 years, 4 months ago (2014-07-29 18:33:31 UTC) #6
Nikhil
Made changes as per review comments. PTAL. Thanks! https://codereview.chromium.org/426653002/diff/20001/chrome/utility/importer/firefox_importer.cc File chrome/utility/importer/firefox_importer.cc (right): https://codereview.chromium.org/426653002/diff/20001/chrome/utility/importer/firefox_importer.cc#newcode576 chrome/utility/importer/firefox_importer.cc:576: const ...
6 years, 4 months ago (2014-07-30 07:31:30 UTC) #7
Peter Kasting
Is it possible to write a unittest for this? If so, please do. LGTM otherwise. ...
6 years, 4 months ago (2014-07-30 19:49:00 UTC) #8
Ilya Sherman
Yes, please do add test coverage for this code. Chrome code is frequently refactored, and ...
6 years, 4 months ago (2014-07-30 20:52:57 UTC) #9
Nikhil
First attempt at test case. PTAL. [1] I introduced new elements, since AddKeywords() is common, ...
6 years, 4 months ago (2014-07-31 09:09:22 UTC) #10
Peter Kasting
I just noticed your CL says BUG=none. This should be associated with some bug. https://codereview.chromium.org/426653002/diff/80001/chrome/browser/importer/firefox_importer_browsertest.cc ...
6 years, 4 months ago (2014-07-31 18:28:21 UTC) #11
Nikhil
I've slightly changed the approach for test case. PTAL. Also, I identified this issue while ...
6 years, 4 months ago (2014-08-04 12:15:11 UTC) #12
Peter Kasting
This whole test implementation is messy and fragile. There are ways to fix it, but ...
6 years, 4 months ago (2014-08-04 21:36:12 UTC) #13
Nikhil
On 2014/08/04 21:36:12, Peter Kasting wrote: > This whole test implementation is messy and fragile. ...
6 years, 4 months ago (2014-08-05 12:20:17 UTC) #14
Nikhil
pkasting@ isherman@ - PTAL. This test implementation is still not perfect, but if you think ...
6 years, 4 months ago (2014-08-11 13:08:45 UTC) #15
Peter Kasting
You're welcome to change search.sqlite if doing so would be useful. https://codereview.chromium.org/426653002/diff/120001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): ...
6 years, 4 months ago (2014-08-11 22:25:05 UTC) #16
Nikhil
Modified test case as per review comments. PTAL. I verified browser tests with gtest_filter=FirefoxProfileImporterBrowserTest.* and ...
6 years, 4 months ago (2014-08-12 09:48:55 UTC) #17
Peter Kasting
Why don't we just have the KeywordInfo object contain both the <4.0 and >=4.0 keywords, ...
6 years, 4 months ago (2014-08-12 18:16:46 UTC) #18
Peter Kasting
https://codereview.chromium.org/426653002/diff/140001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): https://codereview.chromium.org/426653002/diff/140001/chrome/browser/importer/firefox_importer_browsertest.cc#newcode144 chrome/browser/importer/firefox_importer_browsertest.cc:144: virtual void AddKeywords(ScopedVector<TemplateURL> template_urls, On 2014/08/12 18:16:45, Peter Kasting ...
6 years, 4 months ago (2014-08-12 18:23:07 UTC) #19
Nikhil
https://codereview.chromium.org/426653002/diff/140001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): https://codereview.chromium.org/426653002/diff/140001/chrome/browser/importer/firefox_importer_browsertest.cc#newcode49 chrome/browser/importer/firefox_importer_browsertest.cc:49: KeywordInfo(std::string keyword, std::string url) On 2014/08/12 18:16:45, Peter Kasting ...
6 years, 4 months ago (2014-08-13 05:52:42 UTC) #20
Peter Kasting
This hasn't yet addressed the primary complaint I made about the previous patch. https://codereview.chromium.org/426653002/diff/140001/chrome/browser/importer/firefox_importer_browsertest.cc File ...
6 years, 4 months ago (2014-08-13 06:21:07 UTC) #21
Nikhil
On 2014/08/12 18:16:46, Peter Kasting wrote: > Why don't we just have the KeywordInfo object ...
6 years, 4 months ago (2014-08-13 06:31:45 UTC) #22
Nikhil
On 2014/08/13 06:21:07, pkasting (away thru Aug 20) wrote: > This hasn't yet addressed the ...
6 years, 4 months ago (2014-08-13 06:34:55 UTC) #23
Peter Kasting
I'm suggesting we drop the vector idea entirely, go back to something like the original ...
6 years, 4 months ago (2014-08-13 07:44:42 UTC) #24
Nikhil
Introduced third field in KeywordInfo struct and modified the test cases accordingly. PTAL. Thanks!
6 years, 4 months ago (2014-08-13 09:39:29 UTC) #25
Peter Kasting
LGTM https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc#newcode179 chrome/browser/importer/firefox_importer_browsertest.cc:179: (is_sqlite_version_) Nit: Don't parenthesize an expression with only ...
6 years, 4 months ago (2014-08-13 17:32:01 UTC) #26
Ilya Sherman
LGTM with Peter's comments addressed. Thanks! https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc#newcode178 chrome/browser/importer/firefox_importer_browsertest.cc:178: const base::string16& expected_keyword ...
6 years, 4 months ago (2014-08-13 20:14:17 UTC) #27
Ilya Sherman
https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc#newcode178 chrome/browser/importer/firefox_importer_browsertest.cc:178: const base::string16& expected_keyword = On 2014/08/13 20:14:17, Ilya Sherman ...
6 years, 4 months ago (2014-08-13 20:18:43 UTC) #28
Nikhil
This looks ready now :) PTAL. Thanks! https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc File chrome/browser/importer/firefox_importer_browsertest.cc (right): https://codereview.chromium.org/426653002/diff/180001/chrome/browser/importer/firefox_importer_browsertest.cc#newcode178 chrome/browser/importer/firefox_importer_browsertest.cc:178: const base::string16& ...
6 years, 4 months ago (2014-08-14 09:13:08 UTC) #29
Ilya Sherman
LGTM % a final two nits. Thanks! (Apologies for the delay -- I hadn't realized ...
6 years, 4 months ago (2014-08-19 00:13:28 UTC) #30
Nikhil
Final two nit fixes addressed! Thanks Peter and Ilya for reviewing this. I'm going to ...
6 years, 4 months ago (2014-08-19 05:57:46 UTC) #31
Nikhil
The CQ bit was checked by n.bansal@samsung.com
6 years, 4 months ago (2014-08-19 05:58:37 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/n.bansal@samsung.com/426653002/220001
6 years, 4 months ago (2014-08-19 05:59:39 UTC) #33
commit-bot: I haz the power
6 years, 4 months ago (2014-08-19 08:22:20 UTC) #34
Message was sent while issue was closed.
Committed patchset #11 (220001) as 290518

Powered by Google App Engine
This is Rietveld 408576698