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

Unified Diff: chrome/browser/extensions/api/copresence/copresence_api.h

Issue 469883002: Using API key specified from js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing API build Created 6 years, 4 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 | chrome/browser/extensions/api/copresence/copresence_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/copresence/copresence_api.h
diff --git a/chrome/browser/extensions/api/copresence/copresence_api.h b/chrome/browser/extensions/api/copresence/copresence_api.h
index 1f631a3bbe604085e9deaf1725e6e081725d38f9..741d2c40b6593365ca89cad15aa5eb2a176aada0 100644
--- a/chrome/browser/extensions/api/copresence/copresence_api.h
+++ b/chrome/browser/extensions/api/copresence/copresence_api.h
@@ -43,6 +43,8 @@ class CopresenceService : public BrowserContextKeyedAPI,
return apps_by_subscription_id_;
}
+ void set_api_key(const std::string& api_key) { api_key_ = api_key; }
+
// BrowserContextKeyedAPI implementation.
static BrowserContextKeyedAPIFactory<CopresenceService>* GetFactoryInstance();
@@ -56,6 +58,7 @@ class CopresenceService : public BrowserContextKeyedAPI,
const std::vector<copresence::Message>& message) OVERRIDE;
virtual net::URLRequestContextGetter* GetRequestContext() const OVERRIDE;
virtual const std::string GetPlatformVersionString() const OVERRIDE;
+ virtual const std::string GetAPIKey() const OVERRIDE;
virtual copresence::WhispernetClient* GetWhispernetClient() OVERRIDE;
// BrowserContextKeyedAPI implementation.
@@ -65,6 +68,8 @@ class CopresenceService : public BrowserContextKeyedAPI,
std::map<std::string, std::string> apps_by_subscription_id_;
content::BrowserContext* const browser_context_;
+ std::string api_key_;
+
scoped_ptr<copresence::CopresenceClient> client_;
scoped_ptr<copresence::WhispernetClient> whispernet_client_;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/copresence/copresence_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698