Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 176187 Create extensions with locale info from the command line is broken.
Starred by 5 users Project Member Reported by levin@chromium.org, Feb 14 2013 Back to list
Status: Fixed
Owner: yoz@chromium.org
Closed: Feb 2013
Cc: yoz@chromium.org, mhx...@motorola.com
Components:
OS: Linux
Pri: 1
Type: Bug


Sign in to add a comment
1. Save the attachment and unzip it. 
2. Then use Chrome to pack it as an extension. Like this
  chrome --pack-extension=test

You get an error message: "Localization used, but default_locale wasn't specified in the manifest."

Using bisect, I narrowed the range to this:  http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&range=179707%3A179714

It is very likely that this change broke it: http://src.chromium.org/viewvc/chrome?view=rev&revision=179711


 
test.zip
1.1 KB Download
Comment 1 by levin@chromium.org, Feb 14 2013
Cc: mhx...@motorola.com yoz@chromium.org
This bug breaks automated builds that use --pack-extension (and locales).



Comment 2 by mhx...@motorola.com, Feb 14 2013
I will take a look at it tomorrow.
Comment 3 by levin@chromium.org, Feb 14 2013
Thanks!

fwiw, I suspect the problem is how the parse for locale is set-up only when I18nAPI is created (so only after extensions::I18nAPI::GetFactoryInstance(); is called -- https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/extensions/api/i18n/i18n_api.cc&q=DefaultLocaleHandler&sq=package:chromium&l=66 ).


Perhaps, when the command line is run ( https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/chrome_browser_main.cc&sq=package:chromium&type=cs&rcl=1360784647&l=1138 )this constructor didn't get a chance to run. Looking at how this works, it feels a bit fragile. Perhaps PackExtensionJob::Run() should call extensions::I18nAPI::GetFactoryInstance();? (Or something like this...)

Comment 4 by yoz@chromium.org, Feb 14 2013
Labels: ReleaseBlock-Beta
Owner: yoz@chromium.org
Status: Assigned
Project Member Comment 5 by bugdroid1@chromium.org, Feb 15 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=182615

------------------------------------------------------------------------
r182615 | MHX348@motorola.com | 2013-02-15T04:33:35.683917Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/startup_helper.cc?r1=182615&r2=182614&pathrev=182615

Fix a bug where extensions created with locale info from the command line is broken.

Register the ManifestHandler for default_locale

BUG= 176187 
TEST=1. Unzip the test.zip attachment from issue 176187.
2. Use chrome to pack it as an extension (chrome --pack-extension=test).
test.crx should be created successfully.

Review URL: https://chromiumcodereview.appspot.com/12256041
------------------------------------------------------------------------
Comment 6 by levin@chromium.org, Feb 15 2013
Thanks!
Labels: Merge-Requested
r182615 is in 27.0.1413.0 build. Once its verified, I'll approve the merge for M26.
Labels: -Merge-Requested Merge-Approved
Project Member Comment 9 by bugdroid1@chromium.org, Feb 19 2013
Labels: -Merge-Approved merge-merged-1410
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=183250

------------------------------------------------------------------------
r183250 | yoz@chromium.org | 2013-02-19T18:16:48.991015Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1410/src/chrome/browser/extensions/startup_helper.cc?r1=183250&r2=183249&pathrev=183250

Merge 182615
> Fix a bug where extensions created with locale info from the command line is broken.
> 
> Register the ManifestHandler for default_locale
> 
> BUG= 176187 
> TEST=1. Unzip the test.zip attachment from issue 176187.
> 2. Use chrome to pack it as an extension (chrome --pack-extension=test).
> test.crx should be created successfully.
> 
> Review URL: https://chromiumcodereview.appspot.com/12256041

TBR=MHX348@motorola.com
Review URL: https://codereview.chromium.org/12282042
------------------------------------------------------------------------
Comment 10 by yoz@chromium.org, Feb 19 2013
Status: Fixed
Project Member Comment 11 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-Internals -Mstone-26 -Feature-Extensions Cr-Platform-Extensions Cr-Internals M-26
Sign in to add a comment