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

Unified Diff: chrome/browser/sync/syncable/model_type.h

Issue 8851004: [Sync] Replace all instances of ModelTypeBitSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/browser/sync/syncable/model_type.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/model_type.h
diff --git a/chrome/browser/sync/syncable/model_type.h b/chrome/browser/sync/syncable/model_type.h
index 97cb6cd7c2ef5a75d50362df39ae505ccff9ee5b..f31c3777756027a99e79190822d5a29af112b62f 100644
--- a/chrome/browser/sync/syncable/model_type.h
+++ b/chrome/browser/sync/syncable/model_type.h
@@ -10,7 +10,6 @@
#define CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_
#pragma once
-#include <bitset>
#include <set>
#include <string>
@@ -86,10 +85,11 @@ enum ModelType {
MODEL_TYPE_COUNT,
};
-typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet;
typedef std::set<ModelType> ModelTypeSet;
typedef browser_sync::EnumSet<
ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE> ModelEnumSet;
+typedef browser_sync::EnumSet<
+ ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE> FullModelEnumSet;
inline ModelType ModelTypeFromInt(int i) {
DCHECK_GE(i, 0);
@@ -142,30 +142,15 @@ std::string ModelTypeSetToString(const ModelTypeSet& model_types);
// Returns the ModelType corresponding to the name |model_type_string|.
ModelType ModelTypeFromString(const std::string& model_type_string);
-std::string ModelTypeBitSetToString(const ModelTypeBitSet& model_types);
-
std::string ModelEnumSetToString(ModelEnumSet model_types);
-// Convert a ModelTypeSet to a ModelTypeBitSet.
-ModelTypeBitSet ModelTypeBitSetFromSet(const ModelTypeSet& set);
-
-// Convert a ModelTypeBitSet to a ModelTypeSet.
-ModelTypeSet ModelTypeBitSetToSet(const ModelTypeBitSet& bit_set);
-
-ModelEnumSet ModelTypeBitSetToEnumSet(const ModelTypeBitSet& bitset);
-
ModelTypeSet ModelEnumSetToSet(ModelEnumSet enum_set);
ModelEnumSet ModelTypeSetToEnumSet(const ModelTypeSet& model_type_set);
// Caller takes ownership of returned list.
-base::ListValue* ModelTypeBitSetToValue(const ModelTypeBitSet& model_types);
-
-// Caller takes ownership of returned list.
base::ListValue* ModelEnumSetToValue(ModelEnumSet model_types);
-ModelTypeBitSet ModelTypeBitSetFromValue(const base::ListValue& value);
-
// Caller takes ownership of returned list.
base::ListValue* ModelTypeSetToValue(const ModelTypeSet& model_types);
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/browser/sync/syncable/model_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698