0

Plumb through the API key for devtools surveys

Devtools is adding functionality to do in-product surveys via a
non-public API. This CL adds the ability for the chrome-internal
repository to set an API key that gets piped through to devtools.

The API key is added to google_api_keys in the same way that other API
keys are handled, meaning it can be locally overridden, although there
is not much point to actually doing this because the API itself is not
public.

This CL adds a new method 'getSurveyAPIKey' to the InspectorFrontendHost
API which the devtools frontend uses to communicate with chrome.

The corresponding frontend CL is http://crrev.com/c/2361683/

Doc: https://docs.google.com/document/d/1wMRb1hI2zJ1mzOSJjjF46C2hToGksQf2AxurorxaiTg/edit#heading=h.jc7x7daf69yo

Bug: 1112738
Change-Id: Ic3d9d436556f06b8ff8fb3593e4ed40d68ed3507
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362182
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807027}
This commit is contained in:
Peter Marshall
2020-09-15 14:48:22 +00:00
committed by Commit Bot
parent 7237d1343c
commit 4cd7ee2dd9
6 changed files with 34 additions and 0 deletions

@ -83,6 +83,10 @@ std::string GetSharingAPIKey();
// Retrieves the Speech On-Device API (SODA) API Key.
std::string GetSodaAPIKey();
// Retrieves the DevTools Survey API Key. Note there is no public API to replace
// this functionality.
std::string GetDevtoolsSurveysAPIKey();
#if defined(OS_IOS)
// Sets the API key. This should be called as early as possible before this
// API key is even accessed.