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

Issue 1208993011: New thin layer of API extension chrome.i18n.detectLanguage (Closed)

Created:
5 years, 5 months ago by amalika
Modified:
5 years, 5 months ago
CC:
mcindy, chaotian, smn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

New thin layer of API extension chrome.i18n.detectLanguage R=kalman@chromium.org, toyoshim@chromium.org BUG= Committed: https://crrev.com/0cf819bae6edb14d99b5731d6a37cf2b8d7e4f82 Cr-Commit-Position: refs/heads/master@{#339819}

Patch Set 1 #

Total comments: 30

Patch Set 2 : Fixed after the review #

Total comments: 28

Patch Set 3 : Fixed issues and changes to functions due to added LanguageDetectionResult struct #

Total comments: 26

Patch Set 4 : Cleaned up the code #

Total comments: 24

Patch Set 5 : CLD2 call modified/errors fixed. #

Total comments: 8

Patch Set 6 : Final corrections #

Patch Set 7 : After pulling from master branch #

Patch Set 8 : CLD2 dependency added #

Total comments: 4

Patch Set 9 : cld2_platforn_impl added #

Patch Set 10 : Final version before submit #

Total comments: 2

Patch Set 11 : Style errors fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -8 lines) Patch
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/DEPS View 1 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/api_registration.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/i18n/i18n_api.h View 1 2 3 4 2 chunks +25 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/i18n/i18n_api.cc View 1 2 3 4 5 2 chunks +88 lines, -5 lines 0 comments Download
M chrome/common/extensions/api/i18n.json View 1 2 3 4 5 6 3 chunks +58 lines, -3 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 93 (37 generated)
amalika
5 years, 5 months ago (2015-07-07 18:25:45 UTC) #1
Takashi Toyoshima
Quick comments for the first round of review. I review this patch as a Chrome ...
5 years, 5 months ago (2015-07-08 03:19:42 UTC) #2
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode20 chrome/common/extensions/api/i18n.json:20: {"name": "languages", "type": "array", "items": {"type": "string"}, "description": "Array ...
5 years, 5 months ago (2015-07-08 19:27:30 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/20001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode133 chrome/browser/extensions/api/i18n/i18n_api.cc:133: } The i18n API is compiled to a typed ...
5 years, 5 months ago (2015-07-08 19:34:54 UTC) #6
mcindy
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode20 chrome/common/extensions/api/i18n.json:20: {"name": "languages", "type": "array", "items": {"type": "string"}, "description": "Array ...
5 years, 5 months ago (2015-07-08 21:26:12 UTC) #8
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode20 chrome/common/extensions/api/i18n.json:20: {"name": "languages", "type": "array", "items": {"type": "string"}, "description": "Array ...
5 years, 5 months ago (2015-07-08 21:48:00 UTC) #9
amalika
i18n_api.cc and i18_api.h reviewed https://codereview.chromium.org/1208993011/diff/1/chrome/browser/extensions/api/DEPS File chrome/browser/extensions/api/DEPS (right): https://codereview.chromium.org/1208993011/diff/1/chrome/browser/extensions/api/DEPS#newcode8 chrome/browser/extensions/api/DEPS:8: # cld version 2 library ...
5 years, 5 months ago (2015-07-08 21:58:03 UTC) #10
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/20001/chrome/browser/extensions/api/i18n/i18n_api.h File chrome/browser/extensions/api/i18n/i18n_api.h (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/browser/extensions/api/i18n/i18n_api.h#newcode32 chrome/browser/extensions/api/i18n/i18n_api.h:32: class I18nDetectLanguageFunction : public ChromeAsyncExtensionFunction { On 2015/07/08 21:58:03, ...
5 years, 5 months ago (2015-07-08 22:11:49 UTC) #11
mcindy
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode91 chrome/common/extensions/api/i18n.json:91: "language": { "type": "string", "description": "An ISO language code ...
5 years, 5 months ago (2015-07-08 23:12:29 UTC) #12
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode91 chrome/common/extensions/api/i18n.json:91: "language": { "type": "string", "description": "An ISO language code ...
5 years, 5 months ago (2015-07-08 23:13:32 UTC) #13
mcindy
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode69 chrome/common/extensions/api/i18n.json:69: "description": "Defaults to the null string." On 2015/07/08 21:47:59, ...
5 years, 5 months ago (2015-07-08 23:28:02 UTC) #14
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode69 chrome/common/extensions/api/i18n.json:69: "description": "Defaults to the null string." On 2015/07/08 23:28:02, ...
5 years, 5 months ago (2015-07-08 23:29:07 UTC) #15
Takashi Toyoshima
https://codereview.chromium.org/1208993011/diff/1/chrome/browser/extensions/api/i18n/i18n_api.h File chrome/browser/extensions/api/i18n/i18n_api.h (right): https://codereview.chromium.org/1208993011/diff/1/chrome/browser/extensions/api/i18n/i18n_api.h#newcode26 chrome/browser/extensions/api/i18n/i18n_api.h:26: typedef struct { Not yet. struct DetectedLanguage { std::string ...
5 years, 5 months ago (2015-07-09 03:32:34 UTC) #16
mcindy
https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json File chrome/common/extensions/api/i18n.json (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/common/extensions/api/i18n.json#newcode20 chrome/common/extensions/api/i18n.json:20: {"name": "languages", "type": "array", "items": {"type": "string"}, "description": "Array ...
5 years, 5 months ago (2015-07-09 18:38:27 UTC) #17
amalika
Number of changes due to added LanguageDetectionResult struct https://codereview.chromium.org/1208993011/diff/20001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/20001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode133 chrome/browser/extensions/api/i18n/i18n_api.cc:133: } ...
5 years, 5 months ago (2015-07-09 23:00:02 UTC) #18
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/DEPS File chrome/browser/extensions/api/DEPS (right): https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/DEPS#newcode9 chrome/browser/extensions/api/DEPS:9: "+tools/json_schema_compiler", Do you really needs to add the json_schema_compiler ...
5 years, 5 months ago (2015-07-10 16:21:10 UTC) #19
amalika
Before making any further changes https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/i18n/i18n_api.h File chrome/browser/extensions/api/i18n/i18n_api.h (right): https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/i18n/i18n_api.h#newcode30 chrome/browser/extensions/api/i18n/i18n_api.h:30: struct DetectedLanguage { On ...
5 years, 5 months ago (2015-07-10 18:18:36 UTC) #21
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/i18n/i18n_api.h File chrome/browser/extensions/api/i18n/i18n_api.h (right): https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/i18n/i18n_api.h#newcode30 chrome/browser/extensions/api/i18n/i18n_api.h:30: struct DetectedLanguage { On 2015/07/10 18:18:36, amalika wrote: > ...
5 years, 5 months ago (2015-07-13 21:25:10 UTC) #22
amalika
Cleaned up the code https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/DEPS File chrome/browser/extensions/api/DEPS (right): https://codereview.chromium.org/1208993011/diff/40001/chrome/browser/extensions/api/DEPS#newcode9 chrome/browser/extensions/api/DEPS:9: "+tools/json_schema_compiler", On 2015/07/10 16:21:09, kalman ...
5 years, 5 months ago (2015-07-13 23:57:01 UTC) #24
Takashi Toyoshima
lg with one nit in terms of translate/. Please wait for kalman's approval for others. ...
5 years, 5 months ago (2015-07-14 07:28:16 UTC) #26
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode19 chrome/browser/extensions/api/i18n/i18n_api.cc:19: // Typedef only introduced to avoid unreadable code. comment ...
5 years, 5 months ago (2015-07-14 18:42:58 UTC) #27
mcindy
https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode79 chrome/browser/extensions/api/i18n/i18n_api.cc:79: const char* raw_utf8_bytes = utf8_text.c_str(); On 2015/07/14 18:42:57, kalman ...
5 years, 5 months ago (2015-07-14 21:38:27 UTC) #29
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode79 chrome/browser/extensions/api/i18n/i18n_api.cc:79: const char* raw_utf8_bytes = utf8_text.c_str(); On 2015/07/14 21:38:27, mcindy ...
5 years, 5 months ago (2015-07-14 21:48:33 UTC) #30
amalika
https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode19 chrome/browser/extensions/api/i18n/i18n_api.cc:19: // Typedef only introduced to avoid unreadable code. On ...
5 years, 5 months ago (2015-07-14 22:41:02 UTC) #31
mcindy
Fixed and modified the code style errors https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/60001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode77 chrome/browser/extensions/api/i18n/i18n_api.cc:77: const std::string ...
5 years, 5 months ago (2015-07-14 22:41:21 UTC) #32
not at google - send to devlin
lgtm https://codereview.chromium.org/1208993011/diff/80001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): https://codereview.chromium.org/1208993011/diff/80001/chrome/browser/extensions/api/i18n/i18n_api.cc#newcode26 chrome/browser/extensions/api/i18n/i18n_api.cc:26: // max number of languages detected by CLD2 ...
5 years, 5 months ago (2015-07-14 23:16:14 UTC) #33
Takashi Toyoshima
lgtm amalika: you will need to add additional reviewers for extensions/ and tools/ to submit.
5 years, 5 months ago (2015-07-15 04:08:23 UTC) #34
amalika
Adding asvitkine@chromium.org as an owner of extensions/browser/extension_function_histogram_value.h for this chrome.i18n.detectLanguage API. https://codereview.chromium.org/1208993011/diff/80001/chrome/browser/extensions/api/i18n/i18n_api.cc File chrome/browser/extensions/api/i18n/i18n_api.cc (right): ...
5 years, 5 months ago (2015-07-15 22:33:16 UTC) #36
Alexei Svitkine (slow)
lgtm
5 years, 5 months ago (2015-07-16 14:46:36 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/100001
5 years, 5 months ago (2015-07-16 18:58:34 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/74322) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 5 months ago (2015-07-16 19:02:38 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/100001
5 years, 5 months ago (2015-07-16 21:16:22 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/96762) android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 5 months ago (2015-07-16 21:23:26 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/120001
5 years, 5 months ago (2015-07-16 23:04:19 UTC) #51
commit-bot: I haz the power
Exceeded global retry quota
5 years, 5 months ago (2015-07-16 23:38:44 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/140001
5 years, 5 months ago (2015-07-17 01:08:46 UTC) #55
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/81491) (exceeded global ...
5 years, 5 months ago (2015-07-17 02:09:31 UTC) #57
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/140001
5 years, 5 months ago (2015-07-17 16:56:27 UTC) #59
Takashi Toyoshima
amalika: This is a real issue. You need to fix build rules to link the ...
5 years, 5 months ago (2015-07-17 17:38:56 UTC) #60
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/17872)
5 years, 5 months ago (2015-07-17 18:10:01 UTC) #62
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/240001
5 years, 5 months ago (2015-07-21 01:28:27 UTC) #69
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/18639)
5 years, 5 months ago (2015-07-21 02:45:37 UTC) #71
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/280001
5 years, 5 months ago (2015-07-21 18:09:58 UTC) #73
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-21 19:21:10 UTC) #75
not at google - send to devlin
https://codereview.chromium.org/1208993011/diff/280001/chrome/browser/extensions/api/api_registration.gyp File chrome/browser/extensions/api/api_registration.gyp (right): https://codereview.chromium.org/1208993011/diff/280001/chrome/browser/extensions/api/api_registration.gyp#newcode38 chrome/browser/extensions/api/api_registration.gyp:38: [ 'cld_version==0 or cld_version==2', { why the ==0 ?
5 years, 5 months ago (2015-07-21 21:40:58 UTC) #76
amalika
https://codereview.chromium.org/1208993011/diff/280001/chrome/browser/extensions/api/api_registration.gyp File chrome/browser/extensions/api/api_registration.gyp (right): https://codereview.chromium.org/1208993011/diff/280001/chrome/browser/extensions/api/api_registration.gyp#newcode38 chrome/browser/extensions/api/api_registration.gyp:38: [ 'cld_version==0 or cld_version==2', { On 2015/07/21 21:40:58, kalman ...
5 years, 5 months ago (2015-07-21 22:08:34 UTC) #78
not at google - send to devlin
Ok that makes sense, thanks. lgtm. +rockot in case I'm wrong about the gyp stuff.
5 years, 5 months ago (2015-07-21 22:18:20 UTC) #80
Ken Rockot(use gerrit already)
Adding andrewhayden@ as third_party/{cld,cld_2} OWNER: When does version 1 get used? In general does a ...
5 years, 5 months ago (2015-07-21 22:28:39 UTC) #82
Ken Rockot(use gerrit already)
On 2015/07/21 22:28:39, Ken Rockot wrote: > Adding andrewhayden@ as third_party/{cld,cld_2} OWNER: When does version ...
5 years, 5 months ago (2015-07-21 22:30:10 UTC) #83
amalika
https://codereview.chromium.org/1208993011/diff/240001/chrome/browser/extensions/api/api_registration.gyp File chrome/browser/extensions/api/api_registration.gyp (right): https://codereview.chromium.org/1208993011/diff/240001/chrome/browser/extensions/api/api_registration.gyp#newcode38 chrome/browser/extensions/api/api_registration.gyp:38: [ 'cld_version==0 or cld_version==2', { On 2015/07/21 22:28:39, Ken ...
5 years, 5 months ago (2015-07-21 22:40:57 UTC) #84
Ken Rockot(use gerrit already)
On 2015/07/21 22:40:57, amalika wrote: > https://codereview.chromium.org/1208993011/diff/240001/chrome/browser/extensions/api/api_registration.gyp > File chrome/browser/extensions/api/api_registration.gyp (right): > > https://codereview.chromium.org/1208993011/diff/240001/chrome/browser/extensions/api/api_registration.gyp#newcode38 > ...
5 years, 5 months ago (2015-07-21 22:43:11 UTC) #85
Ken Rockot(use gerrit already)
also i didn't see toyoshim@ on the reviewer list already, so adding andrewhayden@ to reviewers ...
5 years, 5 months ago (2015-07-21 22:44:20 UTC) #87
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208993011/300001
5 years, 5 months ago (2015-07-21 22:53:06 UTC) #90
commit-bot: I haz the power
Committed patchset #11 (id:300001)
5 years, 5 months ago (2015-07-22 02:10:26 UTC) #91
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/0cf819bae6edb14d99b5731d6a37cf2b8d7e4f82 Cr-Commit-Position: refs/heads/master@{#339819}
5 years, 5 months ago (2015-07-22 02:11:14 UTC) #92
Matt Giuca
5 years, 5 months ago (2015-07-22 05:15:28 UTC) #93
Message was sent while issue was closed.
I've created a revert of this CL:
https://codereview.chromium.org/1244343002/
(suspected of breaking sizes on Windows; see http://crbug.com/512666).

Powered by Google App Engine
This is Rietveld 408576698