Chromium Code Reviews| 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..11fe7089489d209beec1fa6ce93b682f38cb3cc2 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 || |
|
Vitaly Buka (NO REVIEWS)
2012/10/22 20:52:53
misaligned
gene
2012/10/22 21:44:12
Done.
|
| + !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; |