New issue
Advanced search Search tips

Issue 924268 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Default search engines change order after restarting Chrome

Project Member Reported by orinj@chromium.org, Today (9 hours ago)

Issue description

Chrome Version:
Google Chrome	73.0.3680.0 (Official Build) canary (64-bit) (cohort: Clang-64)
Revision	2f16b323858c7002f70a557e42e5b1425a9d30e8-refs/branch-heads/3680@{#1}
OS	Windows 10 OS Build 16299.904

What steps will reproduce the problem?
* Ensure a C:\Profiles dir exists
* Use Win10 Control Panel/Region/Location to set country to Belarus
* Run `chrome.exe --user-data-dir=C:\Profiles\test_belarus`
* Visit chrome://settings and check default search engines drop-down: the appropriate engines are there, in the correct order.
* Close Chrome
* Run the same command to use the same user-data-dir.
* Check the setting drop-down and see it's in a different order.

What is the expected result?
The list order should not change between runs.

What happens instead?
The list order changes.

 
CaptureOnFirstRun.PNG
10.0 KB View Download
CaptureOnSecondRun.PNG
10.2 KB View Download

Comment 1 by dpa...@chromium.org, Today (9 hours ago)

@orinj: This sounds similar to  issue 632559 , although we were never able to reproduce that bug before.

Comment 2 by orinj@chromium.org, Today (3 hours ago)

Cc: vasi...@chromium.org jdonnelly@chromium.org
Labels: -Pri-3 Pri-2
Status: Started (was: Untriaged)
Thanks, yeah that's the one - the reordered list is kept after second run, so repro is hard if you're looking for changes.  I just kept using new profiles to debug it.

The problem was subtle: a deduplication function was working with a multimap that keeps elements sorted by key, so it implicitly reordered prepopulate engines by prepopulate_id instead of keeping original vector order.  Fixed this specific problem here [1].

Now I'm wondering if there's any reason we might want to fully stabilize the vector order, so that duplicates are cleaned with minimal impact.  Things have apparently always been moved around, but otherwise everything seems fine, so for now I lean toward keeping the CL as it is: minimal, safe, just enough to fix the problem at hand.  But if there are any other existing concerns | quirky behaviors with regard to order, I can do a more thorough reworking of the algorithm.  I just don't know of any yet because this is new territory for me.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1428939

Sign in to add a comment