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 f8085b2409827d06e10b1660efa32ab6511ac2eb..3d8f38db90b3230aef8851de8af222706a631270 100644 |
--- a/chrome/browser/sync/sessions/sync_session_context.h |
+++ b/chrome/browser/sync/sessions/sync_session_context.h |
@@ -22,6 +22,7 @@ |
#include <map> |
#include <string> |
+#include "base/gtest_prod_util.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/time.h" |
#include "chrome/browser/sync/engine/model_safe_worker.h" |
@@ -44,6 +45,7 @@ static const int kDefaultMaxCommitBatchSize = 25; |
namespace sessions { |
class ScopedSessionContextConflictResolver; |
+class SyncSessionContextTest; |
struct SyncSessionSnapshot; |
class TestScopedSessionEventListener; |
@@ -109,14 +111,22 @@ class SyncSessionContext { |
} |
// This is virtual for unit tests. |
- // TODO(lipalani) Consult the unthrottle times before committing data to |
- // the server. |
virtual void SetUnthrottleTime(const syncable::ModelTypeSet& types, |
const base::TimeTicks& time); |
+ // This is virtual for unit tests. |
+ virtual syncable::ModelTypeSet UpdateAndGetCurrentlyThrottledTypes(); |
akalin
2011/11/22 23:34:17
I feel like it's kind of awkward to expose the fac
lipalani1
2011/11/23 01:33:51
I have done this little differently. Let me know w
|
+ |
private: |
typedef std::map<syncable::ModelType, base::TimeTicks> UnthrottleTimes; |
+ FRIEND_TEST_ALL_PREFIXES(SyncSessionContextTest, AddUnthrottleTimeTest); |
+ FRIEND_TEST_ALL_PREFIXES(SyncSessionContextTest, |
+ GetCurrentlyThrottledTypesTest); |
+ |
+ void UpdateThrottledTypes(const base::TimeTicks& time); |
+ syncable::ModelTypeSet GetThrottledTypes() const; |
+ |
// 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. |