Index: chrome/service/service_process_prefs.cc |
diff --git a/chrome/service/service_process_prefs.cc b/chrome/service/service_process_prefs.cc |
index 7de70a4b573e39fab97d28f3ebe7d882d2c984a3..811647dc525c32238714d7fe46c9e28a35fa1e23 100644 |
--- a/chrome/service/service_process_prefs.cc |
+++ b/chrome/service/service_process_prefs.cc |
@@ -54,6 +54,21 @@ void ServiceProcessPrefs::SetBoolean(const std::string& key, bool value) { |
prefs_->SetValue(key, Value::CreateBooleanValue(value)); |
} |
+int ServiceProcessPrefs::GetInt(const std::string& key, |
+ int default_value) const { |
+ const Value* value; |
+ int result = default_value; |
+ if (prefs_->GetValue(key, &value) != PersistentPrefStore::READ_OK || |
+ !value->GetAsInteger(&result)) { |
+ return default_value; |
+ } |
+ return result; |
+} |
+ |
+void ServiceProcessPrefs::SetInt(const std::string& key, int value) { |
+ prefs_->SetValue(key, Value::CreateIntegerValue(value)); |
+} |
+ |
const DictionaryValue* ServiceProcessPrefs::GetDictionary( |
const std::string& key) const { |
const Value* value; |