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

Unified Diff: chrome/browser/sync/sessions/sync_session_context.cc

Issue 8851006: [Sync] Replace all instances of ModelTypeSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup pass #2 Created 9 years 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
Index: chrome/browser/sync/sessions/sync_session_context.cc
diff --git a/chrome/browser/sync/sessions/sync_session_context.cc b/chrome/browser/sync/sessions/sync_session_context.cc
index 8a11c85806a405b3c1ba2ca5485db826cca7785e..fdc9e7d1bdac16134e2416e68916c70f1ac0ac05 100644
--- a/chrome/browser/sync/sessions/sync_session_context.cc
+++ b/chrome/browser/sync/sessions/sync_session_context.cc
@@ -49,12 +49,11 @@ SyncSessionContext::~SyncSessionContext() {
}
}
-void SyncSessionContext::SetUnthrottleTime(const syncable::ModelTypeSet& types,
+void SyncSessionContext::SetUnthrottleTime(syncable::ModelEnumSet types,
const base::TimeTicks& time) {
- for (syncable::ModelTypeSet::const_iterator it = types.begin();
- it != types.end();
- ++it) {
- unthrottle_times_[*it] = time;
+ for (syncable::ModelEnumSet::Iterator it = types.First();
+ it.Good(); it.Inc()) {
+ unthrottle_times_[it.Get()] = time;
}
}
@@ -75,12 +74,12 @@ void SyncSessionContext::PruneUnthrottledTypes(const base::TimeTicks& time) {
// TODO(lipalani): Call this function and fill the return values in snapshot
// so it could be shown in the about:sync page.
-syncable::ModelTypeSet SyncSessionContext::GetThrottledTypes() const {
- syncable::ModelTypeSet types;
+syncable::ModelEnumSet SyncSessionContext::GetThrottledTypes() const {
+ syncable::ModelEnumSet types;
for (UnthrottleTimes::const_iterator it = unthrottle_times_.begin();
it != unthrottle_times_.end();
++it) {
- types.insert(it->first);
+ types.Put(it->first);
}
return types;
}
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_context.h ('k') | chrome/browser/sync/sessions/sync_session_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698