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

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: . Created 6 years, 8 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
« no previous file with comments | « google_apis/gcm/gcm_client_impl.cc ('k') | google_apis/gcm/monitoring/gcm_stats_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 709418ca4dcc7322f6205b1174ddb8dfd0c4379a..7f6a9374df27f82c3c345c707d1a4432c1b26435 100644
--- a/google_apis/gcm/gcm_client_impl_unittest.cc
+++ b/google_apis/gcm/gcm_client_impl_unittest.cc
@@ -14,6 +14,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/monitoring/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"
@@ -67,7 +68,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;
@@ -88,8 +90,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) {
@@ -122,7 +125,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,
@@ -142,10 +146,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(
« no previous file with comments | « google_apis/gcm/gcm_client_impl.cc ('k') | google_apis/gcm/monitoring/gcm_stats_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698