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

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

Issue 1131173004: Removing whispernet_client() by merging its functionality with GetWhispernetClient(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « chrome/browser/extensions/api/copresence/copresence_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9eb1bb8a73b2e23f9667783e76f613643f616280..e742da841c91e24021cc62016501cc2d2df2be5f 100644
--- a/chrome/browser/extensions/api/copresence/copresence_api.cc
+++ b/chrome/browser/extensions/api/copresence/copresence_api.cc
@@ -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() {
« no previous file with comments | « chrome/browser/extensions/api/copresence/copresence_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698