diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 19:45:30 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 19:45:30 +0000 |
commit | d9d8f9f150646e0adcb2948097cea99f89db41c4 (patch) | |
tree | 77437a172d1a057e8c465b20ec8ef517187dddde /sync/sessions/sync_session_context.cc | |
parent | 3c6de13983e12c3506fd53502fc92075b2595136 (diff) | |
download | chromium_src-d9d8f9f150646e0adcb2948097cea99f89db41c4.zip chromium_src-d9d8f9f150646e0adcb2948097cea99f89db41c4.tar.gz chromium_src-d9d8f9f150646e0adcb2948097cea99f89db41c4.tar.bz2 |
sync: Handle type throttling in NudgeTracker
This change removes the ThrottledDataTypeTracker and moves much of its
functionality into the NudgeTracker. This allows us to better control
throttling behavior and fix crbug.com/155296.
This CL re-routes syncer_proto_util type throttling callbacks through
the SyncSession::Delegate to the SyncScheduler. It adds a timer and
some related functions to the SyncScheduler, so the scheduler can now
wake up, unthrottle types, and attempt a sync cycle at the exact time
when throttling expires.
The information about which types are currently throttled has been moved
to the NudgeTracker. This allows the NudgeTracker to take type
throttling into account in functions like NudgeTracker::IsSyncRequired()
and NudgeTracker::RecordSuccessfulSyncCycle().
The DownloadUpdatesCommand's special case for nudge-type syncs has been
extended to take throttling into account. GetCommitIdsCommand has been
updated to fetch its list of throttled types from the nudge tracker.
Unfortunately, this meant that committing from poll-triggered sync
sessions had to be disabled, since poll sync cycles do not have access
to the nudge tracker.
BUG=155296, 116184
Review URL: https://chromiumcodereview.appspot.com/16402013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/sessions/sync_session_context.cc')
-rw-r--r-- | sync/sessions/sync_session_context.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc index 41ed246..9043db3 100644 --- a/sync/sessions/sync_session_context.cc +++ b/sync/sessions/sync_session_context.cc @@ -4,7 +4,6 @@ #include "sync/sessions/sync_session_context.h" -#include "sync/engine/throttled_data_type_tracker.h" #include "sync/sessions/debug_info_getter.h" #include "sync/util/extensions_activity_monitor.h" @@ -19,7 +18,6 @@ SyncSessionContext::SyncSessionContext( syncable::Directory* directory, const std::vector<ModelSafeWorker*>& workers, ExtensionsActivityMonitor* extensions_activity_monitor, - ThrottledDataTypeTracker* throttled_data_type_tracker, const std::vector<SyncEngineEventListener*>& listeners, DebugInfoGetter* debug_info_getter, TrafficRecorder* traffic_recorder, @@ -30,7 +28,6 @@ SyncSessionContext::SyncSessionContext( extensions_activity_monitor_(extensions_activity_monitor), notifications_enabled_(false), max_commit_batch_size_(kDefaultMaxCommitBatchSize), - throttled_data_type_tracker_(throttled_data_type_tracker), debug_info_getter_(debug_info_getter), traffic_recorder_(traffic_recorder), keystore_encryption_enabled_(keystore_encryption_enabled), |