Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Issue 2581553003: Factor out logic to determine whether the default search engine or its base URL has changed (Closed)

Created:
4 years ago by raymes
Modified:
3 years, 10 months ago
CC:
chromium-reviews, skanuj+watch_chromium.org, melevin+watch_chromium.org, donnd+watch_chromium.org, jfweitz+watch_chromium.org, David Black, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, Jered, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Factor out logic to determine whether the default search engine or its base URL has changed For the implementation of crbug.com/674389 we need to be able to detect when the default search engine changes, or when base URL of the default search engine changes. It turns out that we basically track the same changes for instant search. This CL factors out that common logic into a reusable class which can listen for those changes. The existing GoogleURLTracker class only tracks base URL changes when Google is the default search engine, but not base URL changes that occur as a result of the default search engine itself changing. This class notifies the listener of both types of changes. BUG=674389

Patch Set 1 #

Total comments: 12

Patch Set 2 : . #

Patch Set 3 : Factor out logic to determine whether the default search engine or its base URL has changed #

Patch Set 4 : Factor out logic to determine whether the default search engine or its base URL has changed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -70 lines) Patch
M chrome/browser/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/search/instant_service.h View 1 5 chunks +6 lines, -19 lines 0 comments Download
M chrome/browser/search/instant_service.cc View 1 2 3 6 chunks +16 lines, -51 lines 0 comments Download
A chrome/browser/search_engines/search_engine_base_url_tracker.h View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
A chrome/browser/search_engines/search_engine_base_url_tracker.cc View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
raymes
Hey there, PTAL! I will add a test but I wanted to make sure the ...
4 years ago (2016-12-15 04:04:29 UTC) #2
Marc Treib
Nice! Generally looks good; a few comments below. I agree this is a useful thing ...
4 years ago (2016-12-15 10:58:06 UTC) #3
raymes
+pkasting, ptal :) https://codereview.chromium.org/2581553003/diff/1/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/2581553003/diff/1/chrome/browser/search/instant_service.cc#newcode68 chrome/browser/search/instant_service.cc:68: base::Bind(&InstantService::OnSearchEngineBaseURLChanged, On 2016/12/15 10:58:06, Marc Treib ...
4 years ago (2016-12-19 05:44:38 UTC) #5
Peter Kasting
The bug, design doc, and CL don't mention the existing GoogleURLTracker class. Can you update ...
4 years ago (2016-12-19 06:17:13 UTC) #6
Peter Kasting
On 2016/12/19 06:17:13, Peter Kasting wrote: > The bug, design doc, and CL don't mention ...
4 years ago (2016-12-19 06:19:10 UTC) #7
raymes
I updated the CL description. Basically the GoogleURLTracker class only notifies of Google URL changes, ...
4 years ago (2016-12-19 06:24:14 UTC) #9
Peter Kasting
On 2016/12/19 06:24:14, raymes wrote: > I updated the CL description. Basically the GoogleURLTracker class ...
4 years ago (2016-12-19 07:02:15 UTC) #10
raymes
On 2016/12/19 07:02:15, Peter Kasting wrote: > On 2016/12/19 06:24:14, raymes wrote: > > I ...
4 years ago (2016-12-19 22:38:32 UTC) #11
Peter Kasting
On 2016/12/19 22:38:32, raymes wrote: > On 2016/12/19 07:02:15, Peter Kasting wrote: > > I'm ...
4 years ago (2016-12-19 22:45:29 UTC) #12
raymes
On 2016/12/19 22:45:29, Peter Kasting wrote: > On 2016/12/19 22:38:32, raymes wrote: > > On ...
4 years ago (2016-12-19 22:58:49 UTC) #13
Peter Kasting
After some thought, my suggestion is to go ahead and copy what you need to ...
4 years ago (2016-12-19 23:25:26 UTC) #14
raymes
That sounds great, thanks Peter :) On Tue, 20 Dec 2016 at 10:25 <[email protected]> wrote: ...
4 years ago (2016-12-19 23:29:40 UTC) #15
Peter Kasting
Can this be closed?
3 years, 10 months ago (2017-02-11 01:52:43 UTC) #16
Marc Treib
On 2017/02/11 01:52:43, Peter Kasting wrote: > Can this be closed? I still like factoring ...
3 years, 10 months ago (2017-02-13 09:21:00 UTC) #17
raymes
3 years, 10 months ago (2017-02-13 23:24:52 UTC) #18
Message was sent while issue was closed.
On 2017/02/13 09:21:00, Marc Treib wrote:
> On 2017/02/11 01:52:43, Peter Kasting wrote:
> > Can this be closed?
> 
> I still like factoring the URL tracker out of InstantService (i.e. PS 1), even
> if it's not used anywhere else. raymes, do you want to do that? Alternatively,
> any objections to me stealing this? ;)

treib: We ended up pursuing a different path so I'm not really interested but
please feel free to take whatever is useful :)

Powered by Google App Engine
This is Rietveld 408576698