OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/service/service_process_prefs.h" | 5 #include "chrome/service/service_process_prefs.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 | 8 |
9 ServiceProcessPrefs::ServiceProcessPrefs( | 9 ServiceProcessPrefs::ServiceProcessPrefs( |
10 const FilePath& pref_filename, | 10 const FilePath& pref_filename, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 const std::string& key) const { | 69 const std::string& key) const { |
70 const Value* value; | 70 const Value* value; |
71 if (prefs_->GetValue(key, &value) != PersistentPrefStore::READ_OK || | 71 if (prefs_->GetValue(key, &value) != PersistentPrefStore::READ_OK || |
72 !value->IsType(Value::TYPE_LIST)) { | 72 !value->IsType(Value::TYPE_LIST)) { |
73 return NULL; | 73 return NULL; |
74 } | 74 } |
75 | 75 |
76 return static_cast<const ListValue*>(value); | 76 return static_cast<const ListValue*>(value); |
77 } | 77 } |
78 | 78 |
| 79 void ServiceProcessPrefs::SetValue(const std::string& key, base::Value* value) { |
| 80 prefs_->SetValue(key, value); |
| 81 } |
| 82 |
79 void ServiceProcessPrefs::RemovePref(const std::string& key) { | 83 void ServiceProcessPrefs::RemovePref(const std::string& key) { |
80 prefs_->RemoveValue(key); | 84 prefs_->RemoveValue(key); |
81 } | 85 } |
82 | 86 |
OLD | NEW |