Index: chrome/common/content_settings.h |
diff --git a/chrome/common/content_settings.h b/chrome/common/content_settings.h |
index bf92413bc10e9d07f593279604856d7b00e9bc95..18e88b53a7154d73b686e0ca8110f4c26f9e8ccb 100644 |
--- a/chrome/common/content_settings.h |
+++ b/chrome/common/content_settings.h |
@@ -8,6 +8,7 @@ |
#include <string> |
#include <vector> |
+#include "base/enum_validation.h" |
#include "chrome/common/content_settings_pattern.h" |
#include "chrome/common/content_settings_types.h" |
@@ -21,6 +22,9 @@ enum ContentSetting { |
CONTENT_SETTING_SESSION_ONLY, |
CONTENT_SETTING_NUM_SETTINGS |
}; |
+template <> inline bool IsIntValidForEnum<ContentSetting>(int x) { |
darin (slow to review)
2013/05/31 07:11:37
I don't have a solution to offer, but this feels k
|
+ return x >= CONTENT_SETTING_DEFAULT && x < CONTENT_SETTING_NUM_SETTINGS; |
+} |
// Range-checked conversion of an int to a ContentSetting, for use when reading |
// prefs off disk. |