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

Unified Diff: base/prefs/pref_notifier_impl.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_notifier_impl.cc
diff --git a/base/prefs/pref_notifier_impl.cc b/base/prefs/pref_notifier_impl.cc
index c02a7b3f5a5bfd8d4bd5c56ce20ca699e6d10346..d6f6af616460cf50b4391568024b1089bf83e906 100644
--- a/base/prefs/pref_notifier_impl.cc
+++ b/base/prefs/pref_notifier_impl.cc
@@ -38,7 +38,7 @@ PrefNotifierImpl::~PrefNotifierImpl() {
init_observers_.clear();
}
-void PrefNotifierImpl::AddPrefObserver(const char* path,
+void PrefNotifierImpl::AddPrefObserver(const std::string& path,
PrefObserver* obs) {
// Get the pref observer list associated with the path.
PrefObserverList* observer_list = NULL;
@@ -56,7 +56,7 @@ void PrefNotifierImpl::AddPrefObserver(const char* path,
observer_list->AddObserver(obs);
}
-void PrefNotifierImpl::RemovePrefObserver(const char* path,
+void PrefNotifierImpl::RemovePrefObserver(const std::string& path,
PrefObserver* obs) {
DCHECK(thread_checker_.CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698