| Index: google_apis/gcm/tools/mcs_probe.cc
|
| diff --git a/google_apis/gcm/tools/mcs_probe.cc b/google_apis/gcm/tools/mcs_probe.cc
|
| index e958bd4ab9dfeb43a1f047ecf2e7b51ea0e37cfb..6a68359f4900127f899a08327c72d02b62710273 100644
|
| --- a/google_apis/gcm/tools/mcs_probe.cc
|
| +++ b/google_apis/gcm/tools/mcs_probe.cc
|
| @@ -24,6 +24,7 @@
|
| #include "google_apis/gcm/base/mcs_message.h"
|
| #include "google_apis/gcm/base/mcs_util.h"
|
| #include "google_apis/gcm/engine/connection_factory_impl.h"
|
| +#include "google_apis/gcm/engine/gcm_store_impl.h"
|
| #include "google_apis/gcm/engine/mcs_client.h"
|
| #include "net/base/host_mapping_rules.h"
|
| #include "net/base/net_log_logger.h"
|
| @@ -173,7 +174,7 @@ class MCSProbe {
|
|
|
| CommandLine command_line_;
|
|
|
| - base::FilePath rmq_path_;
|
| + base::FilePath gcm_store_path_;
|
| uint64 android_id_;
|
| uint64 secret_;
|
| std::string server_host_;
|
| @@ -195,7 +196,7 @@ class MCSProbe {
|
| scoped_refptr<net::HttpNetworkSession> network_session_;
|
| scoped_ptr<net::ProxyService> proxy_service_;
|
|
|
| - scoped_ptr<RMQStore> rmq_store_;
|
| + scoped_ptr<GCMStore> gcm_store_;
|
| scoped_ptr<MCSClient> mcs_client_;
|
|
|
| scoped_ptr<ConnectionFactoryImpl> connection_factory_;
|
| @@ -209,14 +210,14 @@ MCSProbe::MCSProbe(
|
| const CommandLine& command_line,
|
| scoped_refptr<net::URLRequestContextGetter> url_request_context_getter)
|
| : command_line_(command_line),
|
| - rmq_path_(base::FilePath(FILE_PATH_LITERAL("gcm_rmq_store"))),
|
| + gcm_store_path_(base::FilePath(FILE_PATH_LITERAL("gcm_store"))),
|
| android_id_(0),
|
| secret_(0),
|
| server_port_(0),
|
| url_request_context_getter_(url_request_context_getter),
|
| file_thread_("FileThread") {
|
| if (command_line.HasSwitch(kRMQFileName)) {
|
| - rmq_path_ = command_line.GetSwitchValuePath(kRMQFileName);
|
| + gcm_store_path_ = command_line.GetSwitchValuePath(kRMQFileName);
|
| }
|
| if (command_line.HasSwitch(kAndroidIdSwitch)) {
|
| base::StringToUint64(command_line.GetSwitchValueASCII(kAndroidIdSwitch),
|
| @@ -250,16 +251,16 @@ void MCSProbe::Start() {
|
| server_host_, server_port_).ToString()),
|
| network_session_,
|
| &net_log_));
|
| - rmq_store_.reset(new RMQStore(rmq_path_, file_thread_.message_loop_proxy()));
|
| - mcs_client_.reset(new MCSClient(connection_factory_.get(),
|
| - rmq_store_.get()));
|
| + gcm_store_.reset(
|
| + new GCMStoreImpl(gcm_store_path_, file_thread_.message_loop_proxy()));
|
| + mcs_client_.reset(new MCSClient(connection_factory_.get(), gcm_store_.get()));
|
| run_loop_.reset(new base::RunLoop());
|
| - rmq_store_->Load(base::Bind(&MCSClient::Initialize,
|
| - base::Unretained(mcs_client_.get()),
|
| - base::Bind(&MCSProbe::InitializationCallback,
|
| - base::Unretained(this)),
|
| - base::Bind(&MessageReceivedCallback),
|
| - base::Bind(&MessageSentCallback)));
|
| + gcm_store_->Load(base::Bind(
|
| + &MCSClient::Initialize,
|
| + base::Unretained(mcs_client_.get()),
|
| + base::Bind(&MCSProbe::InitializationCallback, base::Unretained(this)),
|
| + base::Bind(&MessageReceivedCallback),
|
| + base::Bind(&MessageSentCallback)));
|
| run_loop_->Run();
|
| }
|
|
|
|
|