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

Issue 2682453002: Changed keywords conflicts resolution for extensions search engines. (Closed)

Created:
3 years, 10 months ago by Alexander Yashkin
Modified:
3 years, 9 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Changed keywords conflicts resolution for extensions search engines. This is preparation CL for https://codereview.chromium.org/2639153002/. This CL changes logic of keywords conflicts resolution for extension controlled search engines. In previous logic last added keyword always won. New logic does not change extension keywords at all, they become hidden if more relevant keyword is installed. New priority of keywords is: omnibox api extension keywords > extension search engines > user engines. When there are multiple extensions of same type, the last-added wins. BUG=450534 R=pkasting@chromium.org, vasilii@chromium.org, jochen@chromium.org Review-Url: https://codereview.chromium.org/2682453002 Cr-Commit-Position: refs/heads/master@{#453100} Committed: https://chromium.googlesource.com/chromium/src/+/f4eb4359fec12b0cd91dca5b0c8a9857bd55ef7c

Patch Set 1 #

Total comments: 18

Patch Set 2 : Fixed after review, round 1 #

Patch Set 3 : Rebase on master #

Total comments: 2

Patch Set 4 : Fixed after review round 2, changed keywords ranking #

Patch Set 5 : Rebase on master #

Patch Set 6 : Updated test, check removal of search engines. #

Total comments: 27

Patch Set 7 : Updated after review, round 3 #

Total comments: 8

Patch Set 8 : Fixed after review, round 4 #

Total comments: 22

Patch Set 9 : Fixed after review, round 5 #

Patch Set 10 : Fixed TemplateURLServiceTest.RepairPrepopulatedSearchEngines #

Patch Set 11 : Fixed auto variable type must not deduce to a raw pointer type #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -115 lines) Patch
M chrome/browser/extensions/api/omnibox/omnibox_api.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -12 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +165 lines, -19 lines 0 comments Download
M components/search_engines/search_engines_test_util.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/search_engines/search_engines_test_util.cc View 1 2 3 1 chunk +6 lines, -7 lines 0 comments Download
M components/search_engines/template_url_service.h View 1 2 3 4 5 6 7 8 9 4 chunks +21 lines, -5 lines 0 comments Download
M components/search_engines/template_url_service.cc View 1 2 3 4 5 6 7 8 12 chunks +72 lines, -66 lines 0 comments Download

Messages

Total messages: 54 (14 generated)
Alexander Yashkin
I have created separate CL with changes in how extension keywords conflicts resolved needed to ...
3 years, 10 months ago (2017-02-06 19:38:31 UTC) #1
Peter Kasting
https://codereview.chromium.org/2682453002/diff/1/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2682453002/diff/1/chrome/browser/search_engines/template_url_service_unittest.cc#newcode1490 chrome/browser/search_engines/template_url_service_unittest.cc:1490: auto turl_data = GenerateDummyTemplateURLData("ext2"); Nit: "ext2" is pretty random, ...
3 years, 10 months ago (2017-02-07 00:42:45 UTC) #2
Alexander Yashkin
https://codereview.chromium.org/2682453002/diff/1/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2682453002/diff/1/chrome/browser/search_engines/template_url_service_unittest.cc#newcode1490 chrome/browser/search_engines/template_url_service_unittest.cc:1490: auto turl_data = GenerateDummyTemplateURLData("ext2"); On 2017/02/07 at 00:42:45, Peter ...
3 years, 10 months ago (2017-02-07 08:09:20 UTC) #3
vasilii
https://codereview.chromium.org/2682453002/diff/40001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2682453002/diff/40001/components/search_engines/template_url_service.cc#newcode2049 components/search_engines/template_url_service.cc:2049: // the OMNIBOX_API_EXTENSION. I'm confused by the algorithm because ...
3 years, 10 months ago (2017-02-07 16:27:21 UTC) #4
Alexander Yashkin
https://codereview.chromium.org/2682453002/diff/40001/components/search_engines/template_url_service.cc File components/search_engines/template_url_service.cc (right): https://codereview.chromium.org/2682453002/diff/40001/components/search_engines/template_url_service.cc#newcode2049 components/search_engines/template_url_service.cc:2049: // the OMNIBOX_API_EXTENSION. On 2017/02/07 at 16:27:21, vasilii wrote: ...
3 years, 10 months ago (2017-02-07 16:50:11 UTC) #5
Alexander Yashkin
3 years, 10 months ago (2017-02-07 16:50:12 UTC) #6
Peter Kasting
It would be sorta nice if extensions "overlaid" the existing system, so that if you ...
3 years, 10 months ago (2017-02-07 20:36:53 UTC) #7
Alexander Yashkin
On 2017/02/07 at 20:36:53, pkasting wrote: > It would be sorta nice if extensions "overlaid" ...
3 years, 10 months ago (2017-02-08 09:46:08 UTC) #8
vasilii
The algorithm for registering an extension keyword can be the following: - if there is ...
3 years, 10 months ago (2017-02-08 10:49:30 UTC) #9
Alexander Yashkin
On 2017/02/08 at 10:49:30, vasilii wrote: > The algorithm for registering an extension keyword can ...
3 years, 10 months ago (2017-02-08 11:50:33 UTC) #10
vasilii
You got my proposal wrong. Once more - an extension keyword is never modified. It ...
3 years, 10 months ago (2017-02-08 12:36:10 UTC) #11
Alexander Yashkin
On 2017/02/08 at 12:36:10, vasilii wrote: > You got my proposal wrong. Once more - ...
3 years, 10 months ago (2017-02-08 12:50:59 UTC) #12
vasilii
I'm not sure why the original https://codereview.chromium.org/2479113002 depends on https://codereview.chromium.org/2659353002/ Peter's proposal is good. I ...
3 years, 10 months ago (2017-02-08 13:07:10 UTC) #13
Alexander Yashkin
On 2017/02/08 at 13:07:10, vasilii wrote: > I'm not sure why the original https://codereview.chromium.org/2479113002 depends ...
3 years, 10 months ago (2017-02-08 13:27:31 UTC) #14
vasilii
On 2017/02/08 13:27:31, Alexander Yashkin wrote: > On 2017/02/08 at 13:07:10, vasilii wrote: > > ...
3 years, 10 months ago (2017-02-09 13:57:35 UTC) #15
Alexander Yashkin
On 2017/02/09 at 13:57:35, vasilii wrote: > On 2017/02/08 13:27:31, Alexander Yashkin wrote: > > ...
3 years, 10 months ago (2017-02-14 19:35:00 UTC) #16
vasilii
Do you mean an omnibox extension (https://developer.chrome.com/extensions/omnibox)? I'd place like this omnibox extension -> extension ...
3 years, 10 months ago (2017-02-15 12:19:57 UTC) #17
vasilii
Do you mean an omnibox extension (https://developer.chrome.com/extensions/omnibox)? I'd place like this omnibox extension -> extension ...
3 years, 10 months ago (2017-02-15 12:19:57 UTC) #18
Alexander Yashkin
On 2017/02/15 at 12:19:57, vasilii wrote: > Do you mean an omnibox extension (https://developer.chrome.com/extensions/omnibox)? Yes. ...
3 years, 10 months ago (2017-02-15 12:40:25 UTC) #19
vasilii
On 2017/02/15 12:40:25, Alexander Yashkin wrote: > On 2017/02/15 at 12:19:57, vasilii wrote: > > ...
3 years, 10 months ago (2017-02-15 12:45:39 UTC) #20
Alexander Yashkin
On 2017/02/15 at 12:45:39, vasilii wrote: > On 2017/02/15 12:40:25, Alexander Yashkin wrote: > > ...
3 years, 10 months ago (2017-02-15 18:41:16 UTC) #21
Alexander Yashkin
vasilii, PTAL.
3 years, 10 months ago (2017-02-18 20:28:24 UTC) #22
Alexander Yashkin
On 2017/02/18 at 20:28:24, Alexander Yashkin wrote: > vasilii, PTAL. Peter, PTAL as well.
3 years, 10 months ago (2017-02-20 14:16:55 UTC) #23
vasilii
Mostly good https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode179 chrome/browser/search_engines/template_url_service_unittest.cc:179: TemplateURL* AddExtensionSearchEngine(const std::string& keyword, A comment? https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode264 ...
3 years, 10 months ago (2017-02-20 15:30:08 UTC) #24
Alexander Yashkin
https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode179 chrome/browser/search_engines/template_url_service_unittest.cc:179: TemplateURL* AddExtensionSearchEngine(const std::string& keyword, On 2017/02/20 at 15:30:08, vasilii ...
3 years, 10 months ago (2017-02-20 19:52:48 UTC) #25
Alexander Yashkin
jochen@chromium.org, PTAL at omnibox_api.cc changes.
3 years, 10 months ago (2017-02-21 07:29:59 UTC) #27
jochen (gone - plz use gerrit)
please make sure the CL description is wrapped at 80c omnibox_api.cc lgtm
3 years, 10 months ago (2017-02-21 11:31:46 UTC) #30
vasilii
https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode489 chrome/browser/search_engines/template_url_service_unittest.cc:489: TEST_F(TemplateURLServiceTest, AddExtensionKeyword) { On 2017/02/20 15:30:08, vasilii wrote: > ...
3 years, 10 months ago (2017-02-21 13:17:51 UTC) #32
Alexander Yashkin
https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc File chrome/browser/search_engines/template_url_service_unittest.cc (right): https://codereview.chromium.org/2682453002/diff/100001/chrome/browser/search_engines/template_url_service_unittest.cc#newcode489 chrome/browser/search_engines/template_url_service_unittest.cc:489: TEST_F(TemplateURLServiceTest, AddExtensionKeyword) { On 2017/02/21 13:17:51, vasilii wrote: > ...
3 years, 10 months ago (2017-02-21 14:02:21 UTC) #33
vasilii
LGTM but wait for Peter's comments. There was a public holiday yesterday.
3 years, 10 months ago (2017-02-21 14:11:58 UTC) #34
Alexander Yashkin
On 2017/02/21 at 14:11:58, vasilii wrote: > LGTM > > but wait for Peter's comments. ...
3 years, 10 months ago (2017-02-22 06:35:11 UTC) #35
Peter Kasting
I will try to get to this tomorrow.
3 years, 10 months ago (2017-02-23 02:07:11 UTC) #36
Peter Kasting
LGTM I did not think deeply about the TemplateURLService to ask if there were any ...
3 years, 9 months ago (2017-02-25 04:26:53 UTC) #37
Alexander Yashkin
https://codereview.chromium.org/2682453002/diff/140001/chrome/browser/extensions/api/omnibox/omnibox_api.cc File chrome/browser/extensions/api/omnibox/omnibox_api.cc (right): https://codereview.chromium.org/2682453002/diff/140001/chrome/browser/extensions/api/omnibox/omnibox_api.cc#newcode251 chrome/browser/extensions/api/omnibox/omnibox_api.cc:251: for (const auto i : pending_extensions_) { On 2017/02/25 ...
3 years, 9 months ago (2017-02-25 11:34:07 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2682453002/160001
3 years, 9 months ago (2017-02-25 11:39:35 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/318375)
3 years, 9 months ago (2017-02-25 11:56:25 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2682453002/180001
3 years, 9 months ago (2017-02-25 15:58:52 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_tsan_rel_ng/builds/22304)
3 years, 9 months ago (2017-02-25 16:18:00 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2682453002/200001
3 years, 9 months ago (2017-02-25 17:53:09 UTC) #51
commit-bot: I haz the power
3 years, 9 months ago (2017-02-25 18:47:43 UTC) #54
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/f4eb4359fec12b0cd91dca5b0c8a...

Powered by Google App Engine
This is Rietveld 408576698