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

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

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, 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/engine/registration_request.h
diff --git a/google_apis/gcm/engine/registration_request.h b/google_apis/gcm/engine/registration_request.h
index 7b7acbbf08b757ca9c03f91bbf5a7750be0aae56..5103d0448856362aebfb50f5d98d51f7a3a5dda8 100644
--- a/google_apis/gcm/engine/registration_request.h
+++ b/google_apis/gcm/engine/registration_request.h
@@ -10,10 +10,12 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/logging.h"
jianli 2014/03/18 23:53:23 Why is this needed?
juyik 2014/03/20 01:09:53 Done.
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "google_apis/gcm/base/gcm_export.h"
+#include "google_apis/gcm/gcm_stats_recorder.h"
#include "net/base/backoff_entry.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -23,6 +25,8 @@ class URLRequestContextGetter;
namespace gcm {
+class GCMStatsRecorder;
+
// Registration request is used to obtain registration IDs for applications that
// want to use GCM. It requires a set of parameters to be specified to identify
// the Chrome instance, the user, the application and a set of senders that will
@@ -82,7 +86,8 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
const net::BackoffEntry::Policy& backoff_policy,
const RegistrationCallback& callback,
int max_retry_count,
- scoped_refptr<net::URLRequestContextGetter> request_context_getter);
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
+ GCMStatsRecorder* recorder);
virtual ~RegistrationRequest();
void Start();
@@ -107,6 +112,9 @@ class GCM_EXPORT RegistrationRequest : public net::URLFetcherDelegate {
scoped_ptr<net::URLFetcher> url_fetcher_;
int retries_left_;
+ // GCM internal stats recorder instance. Not owned.
+ GCMStatsRecorder* recorder_;
+
base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(RegistrationRequest);

Powered by Google App Engine
This is Rietveld 408576698