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

Unified Diff: sync/sessions/sync_session_context.h

Issue 9732008: [Sync] Store the past 10 traffic records in memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. 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
« sync/engine/traffic_logger.cc ('K') | « sync/engine/traffic_logger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session_context.h
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
index 94129ce9cee033d9b0815e1056b514852f9ece22..8bd00913a467a213411803c14f290e757f12e2d6 100644
--- a/sync/sessions/sync_session_context.h
+++ b/sync/sessions/sync_session_context.h
@@ -20,6 +20,7 @@
#pragma once
#include <map>
+#include <queue>
#include <string>
#include "base/gtest_prod_util.h"
@@ -27,6 +28,7 @@
#include "base/time.h"
#include "sync/engine/model_safe_worker.h"
#include "sync/engine/syncer_types.h"
+#include "sync/engine/traffic_logger.h"
#include "sync/sessions/debug_info_getter.h"
namespace syncable {
@@ -123,6 +125,10 @@ class SyncSessionContext {
// new throttled types this will remain constant through out the sync cycle.
syncable::ModelTypeSet GetThrottledTypes() const;
+ std::queue<TrafficRecord>* traffic_recorder() {
+ return &traffic_recorder_;
+ }
+
private:
typedef std::map<syncable::ModelType, base::TimeTicks> UnthrottleTimes;
@@ -177,6 +183,8 @@ class SyncSessionContext {
// unthrottled.
UnthrottleTimes unthrottle_times_;
+ std::queue<browser_sync::TrafficRecord> traffic_recorder_;
+
DISALLOW_COPY_AND_ASSIGN(SyncSessionContext);
};
« sync/engine/traffic_logger.cc ('K') | « sync/engine/traffic_logger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698