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

Issue 2786033002: Expose way to set google api key through CWVWebView class method. (Closed)

Created:
3 years, 8 months ago by jzw1
Modified:
3 years, 8 months ago
CC:
chromium-reviews, Eugene But (OOO till 7-30), ios-reviews+web_chromium.org, ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Expose way to set google api key through CWVWebView class method. BUG=710370 Review-Url: https://codereview.chromium.org/2786033002 Cr-Commit-Position: refs/heads/master@{#465958} Committed: https://chromium.googlesource.com/chromium/src/+/2d29208212df8151ec07ade59abfc79cd1ca266a

Patch Set 1 #

Patch Set 2 : re-done according to sylvain's suggestion #

Patch Set 3 : added comment to static method #

Total comments: 10

Patch Set 4 : updated comments and removed unnecessary checks #

Patch Set 5 : Added setters to google_api_keys.cc #

Patch Set 6 : remove environment based method. #

Patch Set 7 : add some guards so this only works for ios. #

Total comments: 26

Patch Set 8 : Addressed Comments #

Patch Set 9 : Addressed more comments #

Total comments: 8

Patch Set 10 : Few lints #

Total comments: 8

Patch Set 11 : addressed michaeldo comments #

Patch Set 12 : fix typo #

Patch Set 13 : added tests #

Patch Set 14 : last patch #

Total comments: 6

Patch Set 15 : updated tests #

Patch Set 16 : fix dependency #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -0 lines) Patch
M google_apis/google_api_keys.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +16 lines, -0 lines 0 comments Download
M google_apis/google_api_keys.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +32 lines, -0 lines 0 comments Download
M google_apis/google_api_keys_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +90 lines, -0 lines 0 comments Download
M ios/web_view/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M ios/web_view/internal/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ios/web_view/internal/cwv_web_view.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -0 lines 0 comments Download
M ios/web_view/public/cwv_web_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (15 generated)
jzw1
PTAL
3 years, 8 months ago (2017-03-31 04:56:57 UTC) #2
Hiroshi Ichikawa
https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode82 ios/web_view/internal/cwv_web_view.mm:82: environment->UnSetVar("GOOGLE_API_KEY"); I'm a bit confused how this code takes ...
3 years, 8 months ago (2017-03-31 08:15:27 UTC) #4
Eugene But (OOO till 7-30)
Maybe Sylvain knows why unsetting environment variables is necessary. https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/public/cwv_web_view.h File ios/web_view/public/cwv_web_view.h (right): https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/public/cwv_web_view.h#newcode64 ios/web_view/public/cwv_web_view.h:64: ...
3 years, 8 months ago (2017-03-31 18:15:14 UTC) #6
michaeldo
https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode82 ios/web_view/internal/cwv_web_view.mm:82: environment->UnSetVar("GOOGLE_API_KEY"); On 2017/03/31 08:15:26, Hiroshi Ichikawa wrote: > I'm ...
3 years, 8 months ago (2017-03-31 20:28:16 UTC) #7
Hiroshi Ichikawa
https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode82 ios/web_view/internal/cwv_web_view.mm:82: environment->UnSetVar("GOOGLE_API_KEY"); Can you move google_apis::GetAPIKey() etc. out of DCHECK_EQ()? ...
3 years, 8 months ago (2017-04-03 05:28:16 UTC) #8
michaeldo
I just re-read the comments in google_api_keys and I'm not sure we should go this ...
3 years, 8 months ago (2017-04-03 18:31:44 UTC) #9
Hiroshi Ichikawa
On 2017/04/03 18:31:44, michaeldo wrote: > I just re-read the comments in google_api_keys and I'm ...
3 years, 8 months ago (2017-04-04 02:25:42 UTC) #10
jzw1
On 2017/04/04 02:25:42, Hiroshi Ichikawa wrote: > On 2017/04/03 18:31:44, michaeldo wrote: > > I ...
3 years, 8 months ago (2017-04-11 06:30:16 UTC) #11
Hiroshi Ichikawa
On 2017/04/11 06:30:16, jzw1 wrote: > On 2017/04/04 02:25:42, Hiroshi Ichikawa wrote: > > On ...
3 years, 8 months ago (2017-04-11 06:38:13 UTC) #12
jzw1
https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode82 ios/web_view/internal/cwv_web_view.mm:82: environment->UnSetVar("GOOGLE_API_KEY"); On 2017/04/03 05:28:16, Hiroshi Ichikawa wrote: > Can ...
3 years, 8 months ago (2017-04-11 08:28:46 UTC) #13
jzw1
On 2017/04/11 08:28:46, jzw1 wrote: > https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm > File ios/web_view/internal/cwv_web_view.mm (right): > > https://codereview.chromium.org/2786033002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode82 > ...
3 years, 8 months ago (2017-04-12 10:32:38 UTC) #15
jzw1
3 years, 8 months ago (2017-04-12 10:33:27 UTC) #16
jzw1
PTAL everyone.
3 years, 8 months ago (2017-04-13 04:34:35 UTC) #18
Hiroshi Ichikawa
https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc#newcode209 google_apis/google_api_keys.cc:209: void set_api_key(std::string api_key) { api_key_ = api_key; } const ...
3 years, 8 months ago (2017-04-13 06:42:55 UTC) #19
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc#newcode330 google_apis/google_api_keys.cc:330: #if defined(OS_MACOSX) Should this be OS_IOS ? https://codereview.chromium.org/2786033002/diff/120001/ios/web_view/internal/cwv_web_view.mm ...
3 years, 8 months ago (2017-04-13 15:06:26 UTC) #20
Roger Tawa OOO till Jul 10th
https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.h File google_apis/google_api_keys.h (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.h#newcode107 google_apis/google_api_keys.h:107: void SetClientSecret(std::string client_secret, OAuth2Client client); As discussed over email, ...
3 years, 8 months ago (2017-04-13 17:42:43 UTC) #21
michaeldo
https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc#newcode330 google_apis/google_api_keys.cc:330: #if defined(OS_MACOSX) On 2017/04/13 06:42:55, Hiroshi Ichikawa wrote: > ...
3 years, 8 months ago (2017-04-13 19:28:09 UTC) #22
jzw1
https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc#newcode209 google_apis/google_api_keys.cc:209: void set_api_key(std::string api_key) { api_key_ = api_key; } On ...
3 years, 8 months ago (2017-04-14 02:10:33 UTC) #23
Hiroshi Ichikawa
https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc#newcode209 google_apis/google_api_keys.cc:209: void set_api_key(std::string api_key) { api_key_ = api_key; } On ...
3 years, 8 months ago (2017-04-14 02:19:44 UTC) #24
jzw1
https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/120001/google_apis/google_api_keys.cc#newcode209 google_apis/google_api_keys.cc:209: void set_api_key(std::string api_key) { api_key_ = api_key; } On ...
3 years, 8 months ago (2017-04-14 02:28:53 UTC) #25
Hiroshi Ichikawa
lgtm
3 years, 8 months ago (2017-04-14 02:31:05 UTC) #26
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2786033002/diff/120001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2786033002/diff/120001/ios/web_view/internal/cwv_web_view.mm#newcode69 ios/web_view/internal/cwv_web_view.mm:69: std::string client_id = base::SysNSStringToUTF8(clientID); On 2017/04/14 02:10:32, jzw1 wrote: ...
3 years, 8 months ago (2017-04-14 14:24:48 UTC) #27
michaeldo
lgtm! Thank you! Please see a few nit comments. https://codereview.chromium.org/2786033002/diff/180001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/180001/google_apis/google_api_keys.cc#newcode357 google_apis/google_api_keys.cc:357: ...
3 years, 8 months ago (2017-04-14 15:25:55 UTC) #28
jzw1
https://codereview.chromium.org/2786033002/diff/180001/google_apis/google_api_keys.cc File google_apis/google_api_keys.cc (right): https://codereview.chromium.org/2786033002/diff/180001/google_apis/google_api_keys.cc#newcode357 google_apis/google_api_keys.cc:357: #if defined(OS_IOS) On 2017/04/14 15:25:55, michaeldo wrote: > nit: ...
3 years, 8 months ago (2017-04-17 01:41:20 UTC) #29
Roger Tawa OOO till Jul 10th
lgtm Thanks John.
3 years, 8 months ago (2017-04-18 13:42:48 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2786033002/220001
3 years, 8 months ago (2017-04-19 07:02:28 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/365632) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-19 07:05:45 UTC) #35
jzw1
Hey guys. I realized I forgot to write some tests. PTAL. On Wed, Apr 19, ...
3 years, 8 months ago (2017-04-19 09:08:12 UTC) #36
Eugene But (OOO till 7-30)
Thank you for the tests. still lgtm https://codereview.chromium.org/2786033002/diff/260001/google_apis/google_api_keys_unittest.cc File google_apis/google_api_keys_unittest.cc (right): https://codereview.chromium.org/2786033002/diff/260001/google_apis/google_api_keys_unittest.cc#newcode484 google_apis/google_api_keys_unittest.cc:484: TEST_F(GoogleAPIKeysTest, OverrideAllKeysUsingSetters) ...
3 years, 8 months ago (2017-04-19 16:27:15 UTC) #37
Roger Tawa OOO till Jul 10th
lgtm Agreed, thanks for the tests! https://codereview.chromium.org/2786033002/diff/260001/google_apis/google_api_keys_unittest.cc File google_apis/google_api_keys_unittest.cc (right): https://codereview.chromium.org/2786033002/diff/260001/google_apis/google_api_keys_unittest.cc#newcode534 google_apis/google_api_keys_unittest.cc:534: } Doesn't this ...
3 years, 8 months ago (2017-04-19 18:32:21 UTC) #38
jzw1
https://codereview.chromium.org/2786033002/diff/260001/google_apis/google_api_keys_unittest.cc File google_apis/google_api_keys_unittest.cc (right): https://codereview.chromium.org/2786033002/diff/260001/google_apis/google_api_keys_unittest.cc#newcode484 google_apis/google_api_keys_unittest.cc:484: TEST_F(GoogleAPIKeysTest, OverrideAllKeysUsingSetters) { On 2017/04/19 16:27:14, Eugene But wrote: ...
3 years, 8 months ago (2017-04-20 07:59:49 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2786033002/280001
3 years, 8 months ago (2017-04-20 08:00:28 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/195071) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-20 08:07:56 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2786033002/300001
3 years, 8 months ago (2017-04-20 08:19:29 UTC) #47
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 09:19:46 UTC) #50
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/2d29208212df8151ec07ade59abf...

Powered by Google App Engine
This is Rietveld 408576698