diff options
author | lipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-31 00:03:39 +0000 |
---|---|---|
committer | lipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-31 00:03:39 +0000 |
commit | 96de5f3c1bcff53169190063d7a7352d4688a658 (patch) | |
tree | 82db8d3c0a1b003a2dd66956789bac65e73b6128 /sync/sessions/sync_session_context.cc | |
parent | 279904dc705263d7e40cfc30907247a2acd2e2d8 (diff) | |
download | chromium_src-96de5f3c1bcff53169190063d7a7352d4688a658.zip chromium_src-96de5f3c1bcff53169190063d7a7352d4688a658.tar.gz chromium_src-96de5f3c1bcff53169190063d7a7352d4688a658.tar.bz2 |
We store the past 10 records of client server communication in a queue in memory.
The next patch would address the javascript side of exposing it in the UI.
BUG=
TEST=
Review URL: http://codereview.chromium.org/9732008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/sessions/sync_session_context.cc')
-rw-r--r-- | sync/sessions/sync_session_context.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc index 2001e7f..99b212f 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() { |