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

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: Minor fixes Created 8 years, 6 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 1e8b7dd5b985d6a3a8969456d5ef5194b0599993..935a3a8b8fbf1f65b538903ed39d8172a644ec69 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -22,6 +22,7 @@
#include "sync/engine/nigori_util.h"
#include "sync/engine/sync_scheduler.h"
#include "sync/engine/syncer_types.h"
+#include "sync/engine/throttled_data_type_tracker.h"
#include "sync/internal_api/all_status.h"
#include "sync/internal_api/base_node.h"
#include "sync/internal_api/change_reorder_buffer.h"
@@ -144,6 +145,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),
@@ -602,6 +604,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_;
@@ -955,6 +959,7 @@ bool SyncManager::SyncInternal::Init(
model_safe_routing_info,
workers,
extensions_activity_monitor,
+ &throttled_data_type_tracker_,
listeners,
&debug_info_event_listener_,
&traffic_recorder_));

Powered by Google App Engine
This is Rietveld 408576698