Chromium Code Reviews| Index: chrome/browser/extensions/api/copresence/copresence_api.cc |
| diff --git a/chrome/browser/extensions/api/copresence/copresence_api.cc b/chrome/browser/extensions/api/copresence/copresence_api.cc |
| index f4acd8b55a2082db2a066df0ed70e4a9060cc7eb..3894b30bee802d31f6ddf3305fa490400ea226e1 100644 |
| --- a/chrome/browser/extensions/api/copresence/copresence_api.cc |
| +++ b/chrome/browser/extensions/api/copresence/copresence_api.cc |
| @@ -34,6 +34,8 @@ const char kShuttingDownMessage[] = "Shutting down."; |
| CopresenceService::CopresenceService(content::BrowserContext* context) |
| : is_shutting_down_(false), browser_context_(context) { |
| + device_fingerprint_.set_platform_version( |
| + chrome::VersionInfo().CreateVersionString()); |
| } |
| CopresenceService::~CopresenceService() { |
| @@ -105,8 +107,13 @@ net::URLRequestContextGetter* CopresenceService::GetRequestContext() const { |
| return browser_context_->GetRequestContext(); |
| } |
| -const std::string CopresenceService::GetPlatformVersionString() const { |
| - return chrome::VersionInfo().CreateVersionString(); |
| +const copresence::DeviceFingerprint& |
| +CopresenceService::GetDeviceFingerprint() const { |
| + return device_fingerprint_; |
| +} |
| + |
| +const std::string& GetAPIKey() const { |
| + return api_key_; |
| } |
| copresence::WhispernetClient* CopresenceService::GetWhispernetClient() { |
| @@ -163,8 +170,8 @@ ExtensionFunction::ResponseAction CopresenceSetApiKeyFunction::Run() { |
| api::copresence::SetApiKey::Params::Create(*args_)); |
| EXTENSION_FUNCTION_VALIDATE(params.get()); |
| - // TODO(rkc): Use the API key set by this function for this app. |
| - // http://crbug.com/400617. |
| + // The api key may be set to empty, to clear it. |
| + api_key_ = params->apiKey; |
|
rkc
2014/08/13 21:45:31
Um? api_key_ is declared in CopresenceService, you
Charlie
2014/08/13 22:53:37
It doesn't. I compiled the component, but not the
|
| return RespondNow(NoArguments()); |
| } |