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

Unified Diff: base/prefs/pref_registry.cc

Issue 753603002: Change preference APIs to take std::string instead of const char*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed all calls to c_str() in prefs. Created 6 years 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 | « base/prefs/pref_registry.h ('k') | base/prefs/pref_registry_simple.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_registry.cc
diff --git a/base/prefs/pref_registry.cc b/base/prefs/pref_registry.cc
index 134996185c4dd593709a8085b701d8ce10020d10..69f0494f534408807fb916400e2abe45b4cc0107 100644
--- a/base/prefs/pref_registry.cc
+++ b/base/prefs/pref_registry.cc
@@ -28,7 +28,7 @@ PrefRegistry::const_iterator PrefRegistry::end() const {
return defaults_->end();
}
-void PrefRegistry::SetDefaultPrefValue(const char* pref_name,
+void PrefRegistry::SetDefaultPrefValue(const std::string& pref_name,
base::Value* value) {
DCHECK(value);
const base::Value* current_value = NULL;
@@ -40,7 +40,7 @@ void PrefRegistry::SetDefaultPrefValue(const char* pref_name,
defaults_->ReplaceDefaultValue(pref_name, make_scoped_ptr(value));
}
-void PrefRegistry::RegisterPreference(const char* path,
+void PrefRegistry::RegisterPreference(const std::string& path,
base::Value* default_value) {
base::Value::Type orig_type = default_value->GetType();
DCHECK(orig_type != base::Value::TYPE_NULL &&
« no previous file with comments | « base/prefs/pref_registry.h ('k') | base/prefs/pref_registry_simple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698