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

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

Issue 11360014: Only check if a 'new' preference already exists in checking builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 8862f7f4d88788b26632d4146626cabbee2a2467..5a425770652a53ed884dff565e7cad97c321f3b1 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -787,10 +787,8 @@ void PrefService::RegisterPreference(const char* path,
// The main code path takes ownership, but most don't. We'll be safe.
scoped_ptr<Value> scoped_value(default_value);
- if (FindPreference(path)) {
- NOTREACHED() << "Tried to register duplicate pref " << path;
- return;
- }
+ DCHECK(FindPreference(path) == NULL) <<
Bernhard Bauer 2012/10/31 23:06:14 You could just write DCHECK(!FindPreference(path))
Anthony Berent 2012/11/01 10:25:24 Done.
+ "Tried to register duplicate pref " << path;
base::Value::Type orig_type = default_value->GetType();
DCHECK(orig_type != Value::TYPE_NULL && orig_type != Value::TYPE_BINARY) <<
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698