New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 628649 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Use short_name for omnibox extensions in the address bar, if set in manifest.json

Reported by sia...@gmail.com, Jul 15 2016

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 8350.46.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.57 Safari/537.36
Platform: 8350.46.0 (Official Build) beta-channel peppy

Steps to reproduce the problem:
1. Create an omnibox keyword extension
2. Set namd and short_name in manifest.json
3. Enter keyword

What is the expected behavior?
Use "short_name" in the omnibox if available.

What went wrong?
The complete "name" appears even when "short_name" is set.

Did this work before? Yes I think it was working until yesterday

Chrome version: 52.0.2743.57  Channel: n/a
OS Version: 8350.46.0
Flash Version: Shockwave Flash 22.0 r0

I was wondering if I could send a patch for this since this looks like an easy fix. Thanks.
 
Screenshot 2016-07-15 at 7.57.56 PM.png
2.9 KB View Download

Comment 1 by sia...@gmail.com, Jul 15 2016

Here's the source of my extension in the screenshot.
https://github.com/siadat/chrome-ff

Comment 2 by sia...@gmail.com, Jul 20 2016

OS: Linux, OSX, ChromeOS
Cc: est...@chromium.org
Owner: tdander...@chromium.org
Status: Assigned (was: Unconfirmed)
tdanderson/estade, was this a change made as part of MD top-Chrome?

Comment 4 by est...@chromium.org, Oct 11 2016

Cc: devlin@chromium.org
I can't see how this would have changed. The name is coming from here[1]. We could change name() to short_name() if we wanted to but that doesn't look like it's changed since 2014 (or probably earlier, I think the 2014 change was just a refactor).

[1] https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/omnibox/omnibox_api.cc?rcl=1476199417&l=236
Cc: tdander...@chromium.org
Labels: Proj-MaterialDesign-NativeUI
Owner: devlin@chromium.org
Note also that the screenshot uses the old MD omnibox chip; it is possible that this no longer repros with the updated chip appearance.

Comment 6 by sia...@gmail.com, Oct 11 2016

Thanks for reviewing. Here is a screenshot I just took now using version 53.0.2785.143 (64-bit).

I would love to use this opportunity to contribute a patch to Chromium, if a change is decided eventually. Thanks! :)
Screen Shot 2016-10-12 at 12.37.22 AM.png
9.9 KB View Download
Cc: mea...@chromium.org
I have no objections to changing this to use the short name.  At some point in the future, we are thinking about changing this appearance more fully, but I'm not sure what the timeline for that is (meacer, is there a definitive one?).  But since both names are controlled by the extension, this wouldn't open up any new avenues for phishing.

Assuming meacer's on board, I'm happy to let you take this one, siadat@. :)

Comment 8 by mea...@chromium.org, Oct 11 2016

Using short name SGTM too.

I already have a patch that implements #6 but it needs to be rebased. I'm hoping to get back to it soon.

Comment 9 by mea...@chromium.org, Oct 11 2016

The bug for that change is  bug 453093  and my patch is https://codereview.chromium.org/2217643002/
Looks like I replied without reading the bug :) The change here seems to be simply using the short name instead of the full name for the search chip. My comments were about the larger change of displaying extension name for chrome-extension URLs. We could use the short name for that one as well, just to be consistent.
Cc: rdevlin....@chromium.org
Components: -UI Platform>Extensions UI>Browser>Omnibox
Status: Untriaged (was: Assigned)
I guess they meant rdevlin.cronin@?
Cc: -rdevlin....@chromium.org
Components: -UI>Browser>Omnibox UI>Browser>Omnibox>TabToSearch
Labels: -Pri-2 Hotlist-Polish Pri-3
Owner: rdevlin....@chromium.org
Labels: OS-Linux OS-Mac OS-Windows
Owner: catmulli...@chromium.org
Status: Assigned (was: Untriaged)
Seems reasonable, and this shouldn't have the confusion that happened when we were debating doing the same for the context menus (since there can't be any conflicting menu items).  catmullings@, maybe a good one for you to take a look at?
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f85b6bd9e42ff85a933d64d2d882a9693cf8898

commit 7f85b6bd9e42ff85a933d64d2d882a9693cf8898
Author: Catherine Mullings <catmullings@chromium.org>
Date: Tue Aug 29 19:23:31 2017

[Extensions] Ensure omnibox keyword value is extension short name

Ensures that when an extension's omnibox keyword is activated, the selected
keyword label in the omnibox should be the extension's short name, if supplied.

Bug:  628649 
Change-Id: Ifccf618572bb5e0ec89f848fadd5dfb2e5942beb
Reviewed-on: https://chromium-review.googlesource.com/622927
Commit-Queue: catmullings <catmullings@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498194}
[modify] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/browser/extensions/api/omnibox/omnibox_api.cc
[modify] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/browser/ui/views/location_bar/location_bar_view.h
[modify] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/browser/ui/views/location_bar/selected_keyword_view.h
[add] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/browser/ui/views/location_bar/selected_keyword_view_interactive_uitest.cc
[modify] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/test/BUILD.gn
[add] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/test/data/extensions/omnibox/background.js
[add] https://crrev.com/7f85b6bd9e42ff85a933d64d2d882a9693cf8898/chrome/test/data/extensions/omnibox/manifest.json

Status: Fixed (was: Assigned)

Sign in to add a comment