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

Unified Diff: sync/notifier/gcm_network_channel.h

Issue 144383008: Implement retry for Register call in GCMNetworkChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | « no previous file | sync/notifier/gcm_network_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/gcm_network_channel.h
diff --git a/sync/notifier/gcm_network_channel.h b/sync/notifier/gcm_network_channel.h
index b8bd0a4aca7ff5cc353521470be145d02a88256b..b2e541d9867c1a29f937148e45d8617f39138719 100644
--- a/sync/notifier/gcm_network_channel.h
+++ b/sync/notifier/gcm_network_channel.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
+#include "net/base/backoff_entry.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "sync/base/sync_export.h"
#include "sync/notifier/gcm_network_channel_delegate.h"
@@ -42,7 +43,12 @@ class SYNC_EXPORT_PRIVATE GCMNetworkChannel
// URLFetcherDelegate implementation.
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
+ protected:
+ void ResetRegisterBackoffEntryForTest(
+ const net::BackoffEntry::Policy* policy);
+
private:
+ void Register();
void OnRegisterComplete(const std::string& registration_id,
gcm::GCMClient::Result result);
void RequestAccessToken();
@@ -64,6 +70,7 @@ class SYNC_EXPORT_PRIVATE GCMNetworkChannel
// GCM registration_id is requested one at startup and never refreshed until
// next restart.
std::string registration_id_;
+ scoped_ptr<net::BackoffEntry> register_backoff_entry_;
scoped_ptr<net::URLFetcher> fetcher_;
« no previous file with comments | « no previous file | sync/notifier/gcm_network_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698