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

Unified Diff: google_apis/gcm/gcm_client_impl_unittest.cc

Issue 202083005: Add activity recording capability to gcm internals page. User can refresh, start/stop recording, an… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing arv's comments. Created 6 years, 9 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
Index: google_apis/gcm/gcm_client_impl_unittest.cc
diff --git a/google_apis/gcm/gcm_client_impl_unittest.cc b/google_apis/gcm/gcm_client_impl_unittest.cc
index 229feab49888790de8203e40bd22f7a01b41abb1..740f27351dcf8c295559074d91257d2aeb0a7d2e 100644
--- a/google_apis/gcm/gcm_client_impl_unittest.cc
+++ b/google_apis/gcm/gcm_client_impl_unittest.cc
@@ -13,6 +13,7 @@
#include "google_apis/gcm/base/mcs_util.h"
#include "google_apis/gcm/engine/fake_connection_factory.h"
#include "google_apis/gcm/engine/fake_connection_handler.h"
+#include "google_apis/gcm/gcm_stats_recorder.h"
#include "google_apis/gcm/protocol/android_checkin.pb.h"
#include "google_apis/gcm/protocol/checkin.pb.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
@@ -66,7 +67,8 @@ class FakeMCSClient : public MCSClient {
public:
FakeMCSClient(base::Clock* clock,
ConnectionFactory* connection_factory,
- GCMStore* gcm_store);
+ GCMStore* gcm_store,
+ GCMStatsRecorder* recorder);
virtual ~FakeMCSClient();
virtual void Login(uint64 android_id, uint64 security_token) OVERRIDE;
virtual void SendMessage(const MCSMessage& message) OVERRIDE;
@@ -87,8 +89,9 @@ class FakeMCSClient : public MCSClient {
FakeMCSClient::FakeMCSClient(base::Clock* clock,
ConnectionFactory* connection_factory,
- GCMStore* gcm_store)
- : MCSClient("", clock, connection_factory, gcm_store),
+ GCMStore* gcm_store,
+ GCMStatsRecorder* recorder)
+ : MCSClient("", clock, connection_factory, gcm_store, recorder),
last_android_id_(0u),
last_security_token_(0u),
last_message_tag_(kNumProtoTypes) {
@@ -121,7 +124,8 @@ class FakeGCMInternalsBuilder : public GCMInternalsBuilder {
const std::string& version,
base::Clock* clock,
ConnectionFactory* connection_factory,
- GCMStore* gcm_store) OVERRIDE;
+ GCMStore* gcm_store,
+ GCMStatsRecorder* recorder) OVERRIDE;
virtual scoped_ptr<ConnectionFactory> BuildConnectionFactory(
const std::vector<GURL>& endpoints,
const net::BackoffEntry::Policy& backoff_policy,
@@ -141,10 +145,12 @@ scoped_ptr<MCSClient> FakeGCMInternalsBuilder::BuildMCSClient(
const std::string& version,
base::Clock* clock,
ConnectionFactory* connection_factory,
- GCMStore* gcm_store) {
+ GCMStore* gcm_store,
+ GCMStatsRecorder* recorder) {
return make_scoped_ptr<MCSClient>(new FakeMCSClient(clock,
connection_factory,
- gcm_store));
+ gcm_store,
+ recorder));
}
scoped_ptr<ConnectionFactory> FakeGCMInternalsBuilder::BuildConnectionFactory(

Powered by Google App Engine
This is Rietveld 408576698