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

Unified Diff: sync/internal_api/sync_manager.cc

Issue 10454105: sync: Refactor per-datatype throttling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up and rebased Created 8 years, 7 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: sync/internal_api/sync_manager.cc
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index 9da3e2748f30182993e8cef69414d6c68d4ce05a..2f2f759e21604a3ad6283cae77a07d83db7fc5a5 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -18,6 +18,7 @@
#include "base/string_number_conversions.h"
#include "base/values.h"
#include "net/base/network_change_notifier.h"
+#include "sync/engine/throttled_data_type_tracker.h"
#include "sync/engine/net/server_connection_manager.h"
#include "sync/engine/nigori_util.h"
#include "sync/engine/polling_constants.h"
@@ -146,6 +147,7 @@ class SyncManager::SyncInternal
initialized_(false),
testing_mode_(NON_TEST),
observing_ip_address_changes_(false),
+ throttled_data_type_tracker_(&allstatus_),
traffic_recorder_(kMaxMessagesToRecord, kMaxMessageSizeToRecord),
encryptor_(NULL),
unrecoverable_error_handler_(NULL),
@@ -608,6 +610,8 @@ class SyncManager::SyncInternal
JsSyncManagerObserver js_sync_manager_observer_;
JsMutationEventObserver js_mutation_event_observer_;
+ browser_sync::ThrottledDataTypeTracker throttled_data_type_tracker_;
+
// This is for keeping track of client events to send to the server.
DebugInfoEventListener debug_info_event_listener_;
@@ -952,6 +956,7 @@ bool SyncManager::SyncInternal::Init(
directory(),
model_safe_worker_registrar,
extensions_activity_monitor,
+ &throttled_data_type_tracker_,
listeners,
&debug_info_event_listener_,
&traffic_recorder_);

Powered by Google App Engine
This is Rietveld 408576698