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

Unified Diff: base/prefs/pref_member.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: Reverted changed to values.cc. 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
Index: base/prefs/pref_member.cc
diff --git a/base/prefs/pref_member.cc b/base/prefs/pref_member.cc
index 4fa616f4fb612bb8bc3c6338d39a7f60a3033700..024c693438163de45f9b3ba6872aa9899e8b359a 100644
--- a/base/prefs/pref_member.cc
+++ b/base/prefs/pref_member.cc
@@ -25,16 +25,14 @@ PrefMemberBase::~PrefMemberBase() {
Destroy();
}
-void PrefMemberBase::Init(const char* pref_name,
+void PrefMemberBase::Init(const std::string& pref_name,
PrefService* prefs,
const NamedChangeCallback& observer) {
observer_ = observer;
Init(pref_name, prefs);
}
-void PrefMemberBase::Init(const char* pref_name,
- PrefService* prefs) {
- DCHECK(pref_name);
+void PrefMemberBase::Init(const std::string& pref_name, PrefService* prefs) {
DCHECK(prefs);
DCHECK(pref_name_.empty()); // Check that Init is only called once.
prefs_ = prefs;

Powered by Google App Engine
This is Rietveld 408576698