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

Unified Diff: chrome/browser/sync/engine/syncer_thread.h

Issue 3078022: Unplumb AllStatus from SyncerThread. (Closed)
Patch Set: parens Created 10 years, 4 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 | « chrome/browser/sync/engine/syncer_end_command.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer_thread.h
diff --git a/chrome/browser/sync/engine/syncer_thread.h b/chrome/browser/sync/engine/syncer_thread.h
index b8c8f91d67f5613eee6218e8d4c6b7ec1b582f11..5b7acf2b90e8c25f9beabe33fcee97ec1c55d3a7 100644
--- a/chrome/browser/sync/engine/syncer_thread.h
+++ b/chrome/browser/sync/engine/syncer_thread.h
@@ -22,7 +22,6 @@
#include "base/thread.h"
#include "base/time.h"
#include "base/waitable_event.h"
-#include "chrome/browser/sync/engine/all_status.h"
#if defined(OS_LINUX)
#include "chrome/browser/sync/engine/idle_query_linux.h"
#endif
@@ -103,8 +102,10 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
// 30 minutes by default. If exponential backoff kicks in, this is the
// longest possible poll interval.
static const int kDefaultMaxPollIntervalMs;
+ // Maximum interval for exponential backoff.
+ static const int kMaxBackoffSeconds;
- SyncerThread(sessions::SyncSessionContext* context, AllStatus* all_status);
+ explicit SyncerThread(sessions::SyncSessionContext* context);
virtual ~SyncerThread();
virtual void WatchConnectionManager(ServerConnectionManager* conn_mgr);
@@ -138,6 +139,9 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
virtual SyncerEventChannel* relay_channel();
+ // DDOS avoidance function. The argument and return value is in seconds
+ static int GetRecommendedDelaySeconds(int base_delay_seconds);
+
protected:
virtual void ThreadMain();
void ThreadMainLoop();
@@ -254,7 +258,6 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
// in case of exponential backoff so we only allow one nudge per backoff
// interval.
WaitInterval CalculatePollingWaitTime(
- const AllStatus::Status& status,
int last_poll_wait, // in s
int* user_idle_milliseconds,
bool* continue_sync_cycle,
@@ -301,7 +304,6 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
bool p2p_subscribed_;
scoped_ptr<EventListenerHookup> conn_mgr_hookup_;
- const AllStatus* allstatus_;
// Modifiable versions of kDefaultLongPollIntervalSeconds which can be
// updated by the server.
« no previous file with comments | « chrome/browser/sync/engine/syncer_end_command.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698