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

Issue 390019: Parse messages.json in ExtensionUnpacker (like we do for manifest).... (Closed)

Created:
11 years, 1 month ago by Nebojša Ćirić
Modified:
9 years, 7 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews_googlegroups.com, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org, Paweł Hajdan Jr., jungshik at Google
Visibility:
Public.

Description

Parse messages.json in ExtensionUnpacker (like we do for manifest) and pass them to sandboxed_extension_unpacker. Added unittest files for unpacker and sandboxed unpacker. TEST=Try loading any of the unpacker samples added in this CL. They should either pass, or show error and fail. BUG=27362

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 20

Patch Set 4 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+719 lines, -97 lines) Patch
M chrome/browser/extensions/extension_file_util.h View 1 chunk +3 lines, -0 lines 1 comment Download
M chrome/browser/extensions/extension_file_util.cc View 3 chunks +69 lines, -0 lines 0 comments Download
M chrome/browser/extensions/sandboxed_extension_unpacker.h View 2 3 4 chunks +16 lines, -5 lines 0 comments Download
M chrome/browser/extensions/sandboxed_extension_unpacker.cc View 2 3 5 chunks +140 lines, -78 lines 0 comments Download
A chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc View 3 1 chunk +160 lines, -0 lines 0 comments Download
M chrome/browser/utility_process_host.h View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/utility_process_host_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome.gyp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_unpacker.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_unpacker.cc View 1 2 3 5 chunks +72 lines, -2 lines 0 comments Download
A chrome/common/extensions/extension_unpacker_unittest.cc View 1 2 3 1 chunk +120 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 chunk +7 lines, -5 lines 0 comments Download
A chrome/test/data/extensions/unpacker/empty_default_locale.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/empty_default_locale/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/good_l10n.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/good_l10n/_locales/en_US/messages.json View 1 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/good_l10n/_locales/sr/messages.json View 1 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/good_l10n/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/has_default_missing_locales.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/has_default_missing_locales/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/invalid_default_locale.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/invalid_default_locale/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/invalid_messages_file.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/invalid_messages_file/_locales/en_US/messages.json View 1 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/invalid_messages_file/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/missing_default_data.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/missing_default_data/_locales/en_US/messages.json View 1 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/missing_default_data/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/missing_default_has_locales.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/missing_default_has_locales/manifest.json View 1 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/missing_messages_file.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/missing_messages_file/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/no_l10n.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/no_l10n/manifest.json View 1 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/unpacker/no_locale_data.crx View Binary file 0 comments Download
A chrome/test/data/extensions/unpacker/no_locale_data/manifest.json View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/utility/utility_thread.cc View 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Nebojša Ćirić
I hope this covers out of browser parse. Lots of data files/test extensions - just ...
11 years, 1 month ago (2009-11-12 02:38:09 UTC) #1
Aaron Boodman
This is missing the part where we pass the parsed message catalogs back over IPC ...
11 years, 1 month ago (2009-11-12 07:46:46 UTC) #2
Nebojša Ćirić
All done. I've decided to pass catalogs like we pass images - as a pickled ...
11 years, 1 month ago (2009-11-13 22:38:42 UTC) #3
Nebojša Ćirić
I've made one uber-catalog with locale paths being keys and sub-dictionaries being catalogs. I took ...
11 years, 1 month ago (2009-11-17 02:26:45 UTC) #4
Aaron Boodman
This is looking a lot better, nice work. Particularly appreciate the detailed testing. The one ...
11 years, 1 month ago (2009-11-17 22:49:44 UTC) #5
Nebojša Ćirić
All done. Moved verification code to extension file utils. Re-added default_locale to extension object. http://codereview.chromium.org/390019/diff/9009/9040 ...
11 years, 1 month ago (2009-11-18 01:19:29 UTC) #6
Aaron Boodman
11 years, 1 month ago (2009-11-18 01:31:42 UTC) #7
Cool, lgtm

http://codereview.chromium.org/390019/diff/11001/11043
File chrome/browser/extensions/extension_file_util.h (right):

http://codereview.chromium.org/390019/diff/11001/11043#newcode98
Line 98: bool ValidateLocaleInfo(const Extension& extension, std::string*
error);
Since this doesn't need to be called from outside the .cc file, you should make
it static and omit this in the header.

Powered by Google App Engine
This is Rietveld 408576698