Commit ce403422 authored by deepak.m1's avatar deepak.m1 Committed by Commit bot

Removing whispernet_client() by merging its functionality with GetWhispernetClient().

Currently GetWhispernetClient() internally calls whispernet_client(),
so functionality of whicpernet_client() moved to GetWhispernetClient().
and whispernet_client() removed.

BUG=487175

Review URL: https://codereview.chromium.org/1131173004

Cr-Commit-Position: refs/heads/master@{#329428}
parent 520dd926
......@@ -71,12 +71,6 @@ copresence::CopresenceManager* CopresenceService::manager() {
return manager_.get();
}
audio_modem::WhispernetClient* CopresenceService::whispernet_client() {
if (!whispernet_client_ && !is_shutting_down_)
whispernet_client_.reset(new ChromeWhispernetClient(browser_context_));
return whispernet_client_.get();
}
const std::string CopresenceService::auth_token(const std::string& app_id)
const {
// This won't be const if we use map[]
......@@ -205,7 +199,9 @@ CopresenceService::GetAPIKey(const std::string& app_id) const {
}
audio_modem::WhispernetClient* CopresenceService::GetWhispernetClient() {
return whispernet_client();
if (!whispernet_client_ && !is_shutting_down_)
whispernet_client_.reset(new ChromeWhispernetClient(browser_context_));
return whispernet_client_.get();
}
gcm::GCMDriver* CopresenceService::GetGCMDriver() {
......
......@@ -50,8 +50,6 @@ class CopresenceService final : public BrowserContextKeyedAPI,
// These accessors will always return an object (except during shutdown).
// If the object doesn't exist, they will create one first.
copresence::CopresenceManager* manager();
// TODO(ckehoe): Merge this with GetWhispernetClient() below.
audio_modem::WhispernetClient* whispernet_client();
// A registry containing the app id's associated with every subscription.
SubscriptionToAppMap& apps_by_subscription_id() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment