Skip to content

Commit

Permalink
[fuchsia] Allow official keys to remain unset in Fuchsia builds.
Browse files Browse the repository at this point in the history
This is necessary because Chrome-Fuchsia packages are built and
delivered without API keys.

Bug: 1173606
Change-Id: Ibd26774f66a6224e8b6c63ee770954316980cbd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2669163
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Stephen Roe <steveroe@google.com>
Cr-Commit-Position: refs/heads/master@{#849817}
  • Loading branch information
Stephen Roe authored and Chromium LUCI CQ committed Feb 2, 2021
1 parent d863201 commit 9c5c412
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion google_apis/google_api_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,12 @@ class APIKeyCache {
}

if (key_value == DUMMY_API_TOKEN) {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !defined(OS_FUCHSIA)
// No key should be unset in an official build except the
// GOOGLE_DEFAULT_* keys. The default keys don't trigger this
// check as their "unset" value is not DUMMY_API_TOKEN.
// Exclude Fuchsia to match BUILD.gn.
// TODO(crbug.com/1171510): Update Fuchsia exclusion when bug is fixed.
CHECK(false);
#endif
if (default_if_unset.size() > 0) {
Expand Down

0 comments on commit 9c5c412

Please sign in to comment.