Index: chrome/common/pref_service.cc |
=================================================================== |
--- chrome/common/pref_service.cc (revision 32858) |
+++ chrome/common/pref_service.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -435,8 +435,7 @@ |
} |
scoped_ptr<Value> old_value(GetPrefCopy(path)); |
- bool rv = persistent_->SetBoolean(path, value); |
- DCHECK(rv); |
+ persistent_->SetBoolean(path, value); |
FireObserversIfChanged(path, old_value.get()); |
} |
@@ -455,8 +454,7 @@ |
} |
scoped_ptr<Value> old_value(GetPrefCopy(path)); |
- bool rv = persistent_->SetInteger(path, value); |
- DCHECK(rv); |
+ persistent_->SetInteger(path, value); |
FireObserversIfChanged(path, old_value.get()); |
} |
@@ -475,8 +473,7 @@ |
} |
scoped_ptr<Value> old_value(GetPrefCopy(path)); |
- bool rv = persistent_->SetReal(path, value); |
- DCHECK(rv); |
+ persistent_->SetReal(path, value); |
FireObserversIfChanged(path, old_value.get()); |
} |
@@ -495,8 +492,7 @@ |
} |
scoped_ptr<Value> old_value(GetPrefCopy(path)); |
- bool rv = persistent_->SetString(path, value); |
- DCHECK(rv); |
+ persistent_->SetString(path, value); |
FireObserversIfChanged(path, old_value.get()); |
} |
@@ -519,11 +515,10 @@ |
// Value::SetString only knows about UTF8 strings, so convert the path from |
// the system native value to UTF8. |
std::string path_utf8 = WideToUTF8(base::SysNativeMBToWide(value.value())); |
- bool rv = persistent_->SetString(path, path_utf8); |
+ persistent_->SetString(path, path_utf8); |
#else |
- bool rv = persistent_->SetString(path, value.value()); |
+ persistent_->SetString(path, value.value()); |
#endif |
- DCHECK(rv); |
FireObserversIfChanged(path, old_value.get()); |
} |
@@ -542,8 +537,7 @@ |
} |
scoped_ptr<Value> old_value(GetPrefCopy(path)); |
- bool rv = persistent_->SetString(path, Int64ToWString(value)); |
- DCHECK(rv); |
+ persistent_->SetString(path, Int64ToWString(value)); |
FireObserversIfChanged(path, old_value.get()); |
} |
@@ -585,11 +579,9 @@ |
} |
DictionaryValue* dict = NULL; |
- bool rv = persistent_->GetDictionary(path, &dict); |
- if (!rv) { |
+ if (!persistent_->GetDictionary(path, &dict)) { |
dict = new DictionaryValue; |
- rv = persistent_->Set(path, dict); |
- DCHECK(rv); |
+ persistent_->Set(path, dict); |
} |
return dict; |
} |
@@ -608,11 +600,9 @@ |
} |
ListValue* list = NULL; |
- bool rv = persistent_->GetList(path, &list); |
- if (!rv) { |
+ if (!persistent_->GetList(path, &list)) { |
list = new ListValue; |
- rv = persistent_->Set(path, list); |
- DCHECK(rv); |
+ persistent_->Set(path, list); |
} |
return list; |
} |