Chromium Code Reviews| Index: chrome/browser/sync/sessions/sync_session_context.h |
| diff --git a/chrome/browser/sync/sessions/sync_session_context.h b/chrome/browser/sync/sessions/sync_session_context.h |
| index fbd5c0d023d8029dd4a4af0e55f39d2401072c76..0e7a837fec23f9cc3fcd4e323da38e6c99973d75 100644 |
| --- a/chrome/browser/sync/sessions/sync_session_context.h |
| +++ b/chrome/browser/sync/sessions/sync_session_context.h |
| @@ -19,9 +19,11 @@ |
| #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ |
| #pragma once |
| +#include <map> |
| #include <string> |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/time.h" |
| #include "chrome/browser/sync/engine/model_safe_worker.h" |
| #include "chrome/browser/sync/engine/syncer_types.h" |
| #include "chrome/browser/sync/sessions/debug_info_getter.h" |
| @@ -45,6 +47,8 @@ class ScopedSessionContextConflictResolver; |
| struct SyncSessionSnapshot; |
| class TestScopedSessionEventListener; |
| +typedef std::map<syncable::ModelType, base::TimeTicks> UnthrottleTimes; |
|
akalin
2011/11/21 22:36:04
i think this can be private to SyncSessionContext
lipalani1
2011/11/22 00:47:36
Done.
|
| + |
| class SyncSessionContext { |
| public: |
| SyncSessionContext(ServerConnectionManager* connection_manager, |
| @@ -52,6 +56,9 @@ class SyncSessionContext { |
| ModelSafeWorkerRegistrar* model_safe_worker_registrar, |
| const std::vector<SyncEngineEventListener*>& listeners, |
| DebugInfoGetter* debug_info_getter); |
| + |
| + // Empty constructor for unit tests. |
| + SyncSessionContext(); |
| ~SyncSessionContext(); |
| ConflictResolver* resolver() { return resolver_; } |
| @@ -103,6 +110,9 @@ class SyncSessionContext { |
| OnSyncEngineEvent(event)); |
| } |
| + virtual void AddUnthrottleTime(const syncable::ModelTypeSet& types, |
|
akalin
2011/11/21 22:36:04
comment that it's virtual for unit tests
akalin
2011/11/21 22:36:04
add a TODO to actually use the unthrottle times (f
akalin
2011/11/21 22:36:04
I think SetUnthrottleTime is a better name
lipalani1
2011/11/22 00:47:36
Done.
lipalani1
2011/11/22 00:47:36
Done.
lipalani1
2011/11/22 00:47:36
Done.
|
| + const base::TimeTicks& time); |
| + |
| private: |
| // Rather than force clients to set and null-out various context members, we |
| // extend our encapsulation boundary to scoped helpers that take care of this |
| @@ -147,6 +157,8 @@ class SyncSessionContext { |
| // client behavior on server side. |
| DebugInfoGetter* const debug_info_getter_; |
| + UnthrottleTimes unthrottle_times_; |
|
akalin
2011/11/21 22:36:04
add comment saying that this is a map from throttl
lipalani1
2011/11/22 00:47:36
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
| }; |