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

Unified Diff: google_apis/gcm/engine/mcs_client.h

Issue 121743002: Renaming RMQStore to GCMStore and breaking out its interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates based on CR Created 7 years 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: google_apis/gcm/engine/mcs_client.h
diff --git a/google_apis/gcm/engine/mcs_client.h b/google_apis/gcm/engine/mcs_client.h
index 8087e4ec5b4dac533c727fe6e3750cf025b00e25..65fc57b46b7b0b81a1cbcb6532006fe5bb902dfe 100644
--- a/google_apis/gcm/engine/mcs_client.h
+++ b/google_apis/gcm/engine/mcs_client.h
@@ -17,7 +17,7 @@
#include "google_apis/gcm/base/gcm_export.h"
#include "google_apis/gcm/base/mcs_message.h"
#include "google_apis/gcm/engine/connection_handler.h"
-#include "google_apis/gcm/engine/rmq_store.h"
+#include "google_apis/gcm/engine/gcm_store.h"
namespace google {
namespace protobuf {
@@ -41,10 +41,10 @@ struct ReliablePacketInfo;
class GCM_EXPORT MCSClient {
public:
enum State {
- UNINITIALIZED, // Uninitialized.
- LOADED, // RMQ Load finished, waiting to connect.
- CONNECTING, // Connection in progress.
- CONNECTED, // Connected and running.
+ UNINITIALIZED, // Uninitialized.
+ LOADED, // GCM Load finished, waiting to connect.
+ CONNECTING, // Connection in progress.
+ CONNECTED, // Connected and running.
};
// Callback for informing MCSClient status. It is valid for this to be
@@ -64,22 +64,22 @@ class GCM_EXPORT MCSClient {
typedef base::Callback<void(const std::string& message_id)>
OnMessageSentCallback;
- MCSClient(ConnectionFactory* connection_factory, RMQStore* rmq_store);
+ MCSClient(ConnectionFactory* connection_factory, GCMStore* gcm_store);
virtual ~MCSClient();
// Initialize the client. Will load any previous id/token information as well
- // as unacknowledged message information from the RMQ storage, if it exists,
+ // as unacknowledged message information from the GCM storage, if it exists,
// passing the id/token information back via |initialization_callback| along
- // with a |success == true| result. If no RMQ information is present (and
- // this is therefore a fresh client), a clean RMQ store will be created and
+ // with a |success == true| result. If no GCM information is present (and
+ // this is therefore a fresh client), a clean GCM store will be created and
// values of 0 will be returned via |initialization_callback| with
// |success == true|.
- /// If an error loading the RMQ store is encountered,
+ /// If an error loading the GCM store is encountered,
// |initialization_callback| will be invoked with |success == false|.
void Initialize(const InitializationCompleteCallback& initialization_callback,
const OnMessageReceivedCallback& message_received_callback,
const OnMessageSentCallback& message_sent_callback,
- const RMQStore::LoadResult& load_result);
+ const GCMStore::LoadResult& load_result);
// Logs the client into the server. Client must be initialized.
// |android_id| and |security_token| are optional if this is not a new
@@ -95,7 +95,7 @@ class GCM_EXPORT MCSClient {
// TODO(zea): support TTL.
void SendMessage(const MCSMessage& message, bool use_rmq);
- // Disconnects the client and permanently destroys the persistent RMQ store.
+ // Disconnects the client and permanently destroys the persistent GCM store.
// WARNING: This is permanent, and the client must be recreated with new
// credentials afterwards.
void Destroy();
@@ -120,8 +120,8 @@ class GCM_EXPORT MCSClient {
// Send a heartbeat to the MCS server.
void SendHeartbeat();
- // RMQ Store callback.
- void OnRMQUpdateFinished(bool success);
+ // GCM Store callback.
+ void OnGCMUpdateFinished(bool success);
// Attempt to send a message.
void MaybeSendMessage();
@@ -206,8 +206,8 @@ class GCM_EXPORT MCSClient {
// acknowledged on the next login attempt.
PersistentIdList restored_unackeds_server_ids_;
- // The reliable message queue persistent store. Owned by the caller.
- RMQStore* rmq_store_;
+ // The GCM persistent store. Owned by the caller.
Nicolas Zea 2013/12/28 00:52:13 nit: Owned by caller -> Not owned.
fgorski 2014/01/02 19:46:33 Done.
+ GCMStore* gcm_store_;
// ----- Heartbeats -----
// The current heartbeat interval.

Powered by Google App Engine
This is Rietveld 408576698