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

Issue 22645015: Translate: cleanup on how to pass api key to the script (Closed)

Created:
7 years, 4 months ago by Takashi Toyoshima
Modified:
7 years, 4 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews, arv+watch_chromium.org
Visibility:
Public.

Description

Translate: cleanup on how to pass api key to the script Now that translate.js runs in an isolated world, it is safe to expose API key as an isolated world global variable. Of course, reusing this key outside Chrome is not permitted if it's possible:) BUG=none TEST=browser_tests --gtest_filter='Translate*.*' Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217777

Patch Set 1 #

Total comments: 2

Patch Set 2 : (rebase) #

Patch Set 3 : not delete but assign undefined #

Patch Set 4 : (rebase) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -10 lines) Patch
M chrome/browser/resources/translate.js View 1 2 3 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/translate/translate_script.cc View 2 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Takashi Toyoshima
Hi Evan, Can you take a look this? Presubmit check didn't pass on this file ...
7 years, 4 months ago (2013-08-12 05:54:06 UTC) #1
Evan Stade
https://codereview.chromium.org/22645015/diff/1/chrome/browser/resources/translate.js File chrome/browser/resources/translate.js (right): https://codereview.chromium.org/22645015/diff/1/chrome/browser/resources/translate.js#newcode270 chrome/browser/resources/translate.js:270: delete translateApiKey; what is this supposed to do?
7 years, 4 months ago (2013-08-12 15:24:45 UTC) #2
Takashi Toyoshima
https://codereview.chromium.org/22645015/diff/1/chrome/browser/resources/translate.js File chrome/browser/resources/translate.js (right): https://codereview.chromium.org/22645015/diff/1/chrome/browser/resources/translate.js#newcode270 chrome/browser/resources/translate.js:270: delete translateApiKey; "var translateApiKey = '...';\r\n" is injected before ...
7 years, 4 months ago (2013-08-13 01:18:37 UTC) #3
Evan Stade
On 2013/08/13 01:18:37, Takashi Toyoshima (chromium) wrote: > https://codereview.chromium.org/22645015/diff/1/chrome/browser/resources/translate.js > File chrome/browser/resources/translate.js (right): > > ...
7 years, 4 months ago (2013-08-13 16:35:35 UTC) #4
Takashi Toyoshima
In Stable, > delete x false But, In Canary, > delete x true > x ...
7 years, 4 months ago (2013-08-14 00:26:27 UTC) #5
Takashi Toyoshima
Ah, sorry. it's wrong. > var x = 'xxx'; > delete x false > y ...
7 years, 4 months ago (2013-08-14 00:28:37 UTC) #6
Takashi Toyoshima
Sorry, I was confused. If I define it as a global variable without var, it ...
7 years, 4 months ago (2013-08-14 01:22:38 UTC) #7
Evan Stade
lgtm
7 years, 4 months ago (2013-08-14 21:41:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/toyoshim@chromium.org/22645015/17001
7 years, 4 months ago (2013-08-15 01:55:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/toyoshim@chromium.org/22645015/17001
7 years, 4 months ago (2013-08-15 05:02:02 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/toyoshim@chromium.org/22645015/44001
7 years, 4 months ago (2013-08-15 05:08:50 UTC) #11
commit-bot: I haz the power
7 years, 4 months ago (2013-08-15 11:16:37 UTC) #12
Message was sent while issue was closed.
Change committed as 217777

Powered by Google App Engine
This is Rietveld 408576698