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

Unified Diff: sync/sessions/sync_session_context.cc

Issue 9732008: [Sync] Store the past 10 traffic records in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For submitting. Created 8 years, 9 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 | « sync/sessions/sync_session_context.h ('k') | sync/sync.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session_context.cc
diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc
index 2001e7fc352a8dfb51f354e4a4747799f4a7655e..99b212f178c9c32e389e2b48f7cab92673f54e35 100644
--- a/sync/sessions/sync_session_context.cc
+++ b/sync/sessions/sync_session_context.cc
@@ -11,6 +11,9 @@
namespace browser_sync {
namespace sessions {
+const unsigned int kMaxMessagesToRecord = 10;
+const unsigned int kMaxMessageSizeToRecord = 5 * 1024;
+
SyncSessionContext::SyncSessionContext(
ServerConnectionManager* connection_manager,
syncable::Directory* directory,
@@ -25,7 +28,8 @@ SyncSessionContext::SyncSessionContext(
extensions_activity_monitor_(extensions_activity_monitor),
notifications_enabled_(false),
max_commit_batch_size_(kDefaultMaxCommitBatchSize),
- debug_info_getter_(debug_info_getter) {
+ debug_info_getter_(debug_info_getter),
+ traffic_recorder_(kMaxMessagesToRecord, kMaxMessageSizeToRecord) {
std::vector<SyncEngineEventListener*>::const_iterator it;
for (it = listeners.begin(); it != listeners.end(); ++it)
listeners_.AddObserver(*it);
@@ -36,7 +40,8 @@ SyncSessionContext::SyncSessionContext()
directory_(NULL),
registrar_(NULL),
extensions_activity_monitor_(NULL),
- debug_info_getter_(NULL) {
+ debug_info_getter_(NULL),
+ traffic_recorder_(kMaxMessagesToRecord, kMaxMessageSizeToRecord) {
}
SyncSessionContext::~SyncSessionContext() {
« no previous file with comments | « sync/sessions/sync_session_context.h ('k') | sync/sync.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698