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

Unified Diff: components/copresence/rpc/rpc_handler.cc

Issue 704923002: Add polling and audio check to copresence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: components/copresence/rpc/rpc_handler.cc
diff --git a/components/copresence/rpc/rpc_handler.cc b/components/copresence/rpc/rpc_handler.cc
index d82159f2454d3174e3c6b37787b843101904b085..50aebba10a4f46bed91bc93b6415d318ba037d79 100644
--- a/components/copresence/rpc/rpc_handler.cc
+++ b/components/copresence/rpc/rpc_handler.cc
@@ -27,7 +27,6 @@
#include "components/copresence/proto/rpcs.pb.h"
#include "components/copresence/public/copresence_constants.h"
#include "components/copresence/public/copresence_delegate.h"
-#include "components/copresence/public/whispernet_client.h"
#include "components/copresence/rpc/http_post.h"
#include "net/http/http_status_code.h"
@@ -171,15 +170,10 @@ RpcHandler::RpcHandler(CopresenceDelegate* delegate,
}
RpcHandler::~RpcHandler() {
- for (HttpPost* post : pending_posts_) {
+ // Do not use |directive_handler_| here, it will already have been
+ // destructed.
+ for (HttpPost* post : pending_posts_)
delete post;
- }
-
- // TODO(ckehoe): Register and cancel these callbacks in the same class.
- delegate_->GetWhispernetClient()->RegisterTokensCallback(
- WhispernetClient::TokensCallback());
- delegate_->GetWhispernetClient()->RegisterSamplesCallback(
- WhispernetClient::SamplesCallback());
}
void RpcHandler::RegisterForToken(const std::string& auth_token,

Powered by Google App Engine
This is Rietveld 408576698