diff options
author | lipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-01 20:22:44 +0000 |
---|---|---|
committer | lipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-01 20:22:44 +0000 |
commit | b01a9b9bad2a7f403c67c0cc7d5dfe5d119a0dc8 (patch) | |
tree | 52cac4ff89e4fb2dc6666260f5035ffd84d20bb9 /sync/sessions | |
parent | 1d8634849b6155e97fb4a87fff7022d545133aad (diff) | |
download | chromium_src-b01a9b9bad2a7f403c67c0cc7d5dfe5d119a0dc8.zip chromium_src-b01a9b9bad2a7f403c67c0cc7d5dfe5d119a0dc8.tar.gz chromium_src-b01a9b9bad2a7f403c67c0cc7d5dfe5d119a0dc8.tar.bz2 |
A new 'traffic' tab is introduced and clicking the button on the tab would display the traffic.
BUG=117615
TEST=
Review URL: http://codereview.chromium.org/9826035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/sessions')
-rw-r--r-- | sync/sessions/sync_session_context.cc | 7 | ||||
-rw-r--r-- | sync/sessions/sync_session_context.h | 8 | ||||
-rw-r--r-- | sync/sessions/sync_session_unittest.cc | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc index 99b212f..2ebe655 100644 --- a/sync/sessions/sync_session_context.cc +++ b/sync/sessions/sync_session_context.cc @@ -20,7 +20,8 @@ SyncSessionContext::SyncSessionContext( ModelSafeWorkerRegistrar* model_safe_worker_registrar, ExtensionsActivityMonitor* extensions_activity_monitor, const std::vector<SyncEngineEventListener*>& listeners, - DebugInfoGetter* debug_info_getter) + DebugInfoGetter* debug_info_getter, + browser_sync::TrafficRecorder* traffic_recorder) : resolver_(NULL), connection_manager_(connection_manager), directory_(directory), @@ -29,7 +30,7 @@ SyncSessionContext::SyncSessionContext( notifications_enabled_(false), max_commit_batch_size_(kDefaultMaxCommitBatchSize), debug_info_getter_(debug_info_getter), - traffic_recorder_(kMaxMessagesToRecord, kMaxMessageSizeToRecord) { + traffic_recorder_(traffic_recorder) { std::vector<SyncEngineEventListener*>::const_iterator it; for (it = listeners.begin(); it != listeners.end(); ++it) listeners_.AddObserver(*it); @@ -41,7 +42,7 @@ SyncSessionContext::SyncSessionContext() registrar_(NULL), extensions_activity_monitor_(NULL), debug_info_getter_(NULL), - traffic_recorder_(kMaxMessagesToRecord, kMaxMessageSizeToRecord) { + traffic_recorder_(NULL) { } SyncSessionContext::~SyncSessionContext() { diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h index 60e3d59..5c21726 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.h @@ -56,7 +56,8 @@ class SyncSessionContext { ModelSafeWorkerRegistrar* model_safe_worker_registrar, ExtensionsActivityMonitor* extensions_activity_monitor, const std::vector<SyncEngineEventListener*>& listeners, - DebugInfoGetter* debug_info_getter); + DebugInfoGetter* debug_info_getter, + browser_sync::TrafficRecorder* traffic_recorder); // Empty constructor for unit tests. SyncSessionContext(); @@ -125,7 +126,7 @@ class SyncSessionContext { syncable::ModelTypeSet GetThrottledTypes() const; browser_sync::TrafficRecorder* traffic_recorder() { - return &traffic_recorder_; + return traffic_recorder_; } private: @@ -182,8 +183,7 @@ class SyncSessionContext { // unthrottled. UnthrottleTimes unthrottle_times_; - // TODO(lipalani): Move the creation of this to |SyncManager|. - browser_sync::TrafficRecorder traffic_recorder_; + browser_sync::TrafficRecorder* traffic_recorder_; DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); }; diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc index 1f87018..48524a4 100644 --- a/sync/sessions/sync_session_unittest.cc +++ b/sync/sessions/sync_session_unittest.cc @@ -43,7 +43,7 @@ class SyncSessionTest : public testing::Test, context_.reset( new SyncSessionContext( NULL, NULL, this, &extensions_activity_monitor_, - std::vector<SyncEngineEventListener*>(), NULL)); + std::vector<SyncEngineEventListener*>(), NULL, NULL)); routes_.clear(); routes_[syncable::BOOKMARKS] = GROUP_UI; routes_[syncable::AUTOFILL] = GROUP_DB; |