0

[google_apis] Only define platform-specific keys on those platforms

GOOGLE_API_KEY_ANDROID_NON_STABLE is specific to Android.

GOOGLE_API_KEY_SHARING is used by Nearby.
Per https://crrev.com/c/2441025, the feature but is now
"a Chrome OS-only feature." https://crrev.com/c/2564980 later updated
the condition for files that use this feature to use `is_chromeos_ash`
instead of `is_chromeos`.

Bug: 1031156, 1377536
Change-Id: I77ad476d373cd6dfb98a5ed5f71f8ff79270199a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984260
Auto-Submit: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064783}
This commit is contained in:
David Dorwin
2022-10-28 10:40:50 +00:00
committed by Chromium LUCI CQ
parent b4aa65faee
commit 581738bbaf
3 changed files with 21 additions and 2 deletions

@ -10,6 +10,7 @@
#include <string>
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "google_apis/buildflags.h"
// These functions enable you to retrieve keys to use for Google APIs
@ -78,8 +79,10 @@ std::string GetNonStableAPIKey();
// Retrieves the Chrome Remote Desktop API key.
std::string GetRemotingAPIKey();
#if BUILDFLAG(IS_CHROMEOS_ASH)
// Retrieves the Sharing API Key.
std::string GetSharingAPIKey();
#endif
// Retrieves the Speech On-Device API (SODA) API Key.
std::string GetSodaAPIKey();