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

Unified Diff: google_apis/google_api_keys.h

Issue 2786033002: Expose way to set google api key through CWVWebView class method. (Closed)
Patch Set: Few lints Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | google_apis/google_api_keys.cc » ('j') | google_apis/google_api_keys.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/google_api_keys.h
diff --git a/google_apis/google_api_keys.h b/google_apis/google_api_keys.h
index e10078c330a142b8a3a01a9fba125d4dca75bb89..c6022fe700d0daaa37aeae089a541d4157b3187d 100644
--- a/google_apis/google_api_keys.h
+++ b/google_apis/google_api_keys.h
@@ -73,6 +73,12 @@ std::string GetNonStableAPIKey();
std::string GetRemotingAPIKey();
+#if defined(OS_IOS)
+// Sets the API key. This should be called as early as possible before this
+// API key is even accessed. Currently only allowed on iOS.
michaeldo 2017/04/14 15:25:55 nit: I don't think we need the "Currently only all
jzw1 2017/04/17 01:41:20 Done.
+void SetAPIKey(const std::string& api_key);
+#endif
+
// Represents the different sets of client IDs and secrets in use.
enum OAuth2Client {
CLIENT_MAIN, // Several different features use this.
@@ -97,6 +103,18 @@ std::string GetOAuth2ClientID(OAuth2Client client);
// in, e.g. URL-escaped if you use it in a URL.
std::string GetOAuth2ClientSecret(OAuth2Client client);
+#if defined(OS_IOS)
+// Sets the client id for the specified client. Should be called as early as
+// possible before these ids are accessed. Currently only allowed on iOS.
+void SetOAuth2ClientID(OAuth2Client client, const std::string& client_id);
+#endif
+
michaeldo 2017/04/14 15:25:55 nit: Put both of these methods inside a single #if
jzw1 2017/04/17 01:41:20 Done.
+#if defined(OS_IOS)
+// Sets the client secret for the specified client. Should be called as early as
+// possible before these secrets are accessed. Currently only allowed on iOS.
+void SetOAuth2ClientSecret(OAuth2Client client,
+ const std::string& client_secret);
+#endif
// Returns the auth token for the data reduction proxy.
std::string GetSpdyProxyAuthValue();
« no previous file with comments | « no previous file | google_apis/google_api_keys.cc » ('j') | google_apis/google_api_keys.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698