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

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

Issue 712833002: Undoing revert, cl is not the cause of gcm crash on canary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
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
« no previous file with comments | « components/copresence/public/copresence_delegate.h ('k') | components/copresence/rpc/rpc_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/rpc/rpc_handler.h
diff --git a/components/copresence/rpc/rpc_handler.h b/components/copresence/rpc/rpc_handler.h
index e2e999fda33578b4d4c31f2de3839854d2e92bbf..555a8b120df04ac5f052b9da85c25e43a83e1edf 100644
--- a/components/copresence/rpc/rpc_handler.h
+++ b/components/copresence/rpc/rpc_handler.h
@@ -22,6 +22,7 @@ namespace copresence {
struct AudioToken;
class CopresenceDelegate;
class DirectiveHandler;
+class GCMHandler;
class HttpPost;
class ReportRequest;
class RequestHeader;
@@ -65,6 +66,7 @@ class RpcHandler {
// |server_post_callback| should be set only by tests.
RpcHandler(CopresenceDelegate* delegate,
DirectiveHandler* directive_handler,
+ GCMHandler* gcm_handler,
const PostCallback& server_post_callback = PostCallback());
virtual ~RpcHandler();
@@ -107,8 +109,12 @@ class RpcHandler {
void SendReportRequest(scoped_ptr<ReportRequest> request,
const std::string& auth_token);
+ // Store a GCM ID and send it to the server if needed.
+ void RegisterGcmId(const std::string& gcm_id);
+
// Server call response handlers.
void RegisterResponseHandler(const std::string& auth_token,
+ bool gcm_pending,
HttpPost* completed_post,
int http_status_code,
const std::string& response_data);
@@ -152,8 +158,9 @@ class RpcHandler {
const PostCleanupCallback& callback);
// These belong to the caller.
- CopresenceDelegate* delegate_;
- DirectiveHandler* directive_handler_;
+ CopresenceDelegate* const delegate_;
+ DirectiveHandler* const directive_handler_;
+ GCMHandler* const gcm_handler_;
PostCallback server_post_callback_;
@@ -161,6 +168,7 @@ class RpcHandler {
TimedMap<std::string, bool> invalid_audio_token_cache_;
std::map<std::string, std::string> device_id_by_auth_token_;
std::set<HttpPost*> pending_posts_;
+ std::string gcm_id_;
DISALLOW_COPY_AND_ASSIGN(RpcHandler);
};
« no previous file with comments | « components/copresence/public/copresence_delegate.h ('k') | components/copresence/rpc/rpc_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698