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

Unified Diff: chrome/browser/prefs/pref_value_map.cc

Issue 7520023: Converted IncognitoForced boolean policy into IncognitoModeAvailability enum policy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix enum entry names & wrong include path. Created 9 years, 5 months 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/prefs/pref_value_map.cc
diff --git a/chrome/browser/prefs/pref_value_map.cc b/chrome/browser/prefs/pref_value_map.cc
index b810519bbb27795d59960c27c283ebdb571553d7..3d69cf160dee72610500222f04c591b6d7ee8808 100644
--- a/chrome/browser/prefs/pref_value_map.cc
+++ b/chrome/browser/prefs/pref_value_map.cc
@@ -102,6 +102,15 @@ void PrefValueMap::SetString(const std::string& key,
SetValue(key, Value::CreateStringValue(value));
}
+bool PrefValueMap::GetInteger(const std::string& key, int* value) const {
+ const Value* stored_value = NULL;
+ return GetValue(key, &stored_value) && stored_value->GetAsInteger(value);
+}
+
+void PrefValueMap::SetInteger(const std::string& key, const int value) {
+ SetValue(key, Value::CreateIntegerValue(value));
+}
+
void PrefValueMap::GetDifferingKeys(
const PrefValueMap* other,
std::vector<std::string>* differing_keys) const {

Powered by Google App Engine
This is Rietveld 408576698