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..f198d40c084014c4b59935d27f99aa6429f1ab7c 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" |
| @@ -52,6 +54,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,7 +108,15 @@ class SyncSessionContext { |
| OnSyncEngineEvent(event)); |
| } |
| + // This is virtual to test this in unit tests. |
|
akalin
2011/11/22 04:26:33
"to test this in" -> "for"
|
| + // TODO(lipalani) Consult the unthrottle times before committing data to |
| + // the server. |
| + virtual void SetUnthrottleTime(const syncable::ModelTypeSet& types, |
| + const base::TimeTicks& time); |
| + |
| private: |
| + typedef std::map<syncable::ModelType, base::TimeTicks> UnthrottleTimes; |
| + |
| // 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 |
| // once they are allocated. See definitions of these below. |
| @@ -147,6 +160,10 @@ class SyncSessionContext { |
| // client behavior on server side. |
| DebugInfoGetter* const debug_info_getter_; |
| + // This is a map from throttled datatypes to the time at which they can be |
|
akalin
2011/11/22 04:26:33
datatypes -> data types
|
| + // unthrottled. |
| + UnthrottleTimes unthrottle_times_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
| }; |