Lines Matching refs:path
261 void PrefService::RegisterBooleanPref(const char* path,
263 RegisterPreference(path, Value::CreateBooleanValue(default_value));
266 void PrefService::RegisterIntegerPref(const char* path, int default_value) {
267 RegisterPreference(path, Value::CreateIntegerValue(default_value));
270 void PrefService::RegisterDoublePref(const char* path, double default_value) {
271 RegisterPreference(path, Value::CreateDoubleValue(default_value));
274 void PrefService::RegisterStringPref(const char* path,
276 RegisterPreference(path, Value::CreateStringValue(default_value));
279 void PrefService::RegisterFilePathPref(const char* path,
281 RegisterPreference(path, Value::CreateStringValue(default_value.value()));
284 void PrefService::RegisterListPref(const char* path) {
285 RegisterPreference(path, new ListValue());
288 void PrefService::RegisterListPref(const char* path, ListValue* default_value) {
289 RegisterPreference(path, default_value);
292 void PrefService::RegisterDictionaryPref(const char* path) {
293 RegisterPreference(path, new DictionaryValue());
296 void PrefService::RegisterDictionaryPref(const char* path,
298 RegisterPreference(path, default_value);
301 void PrefService::RegisterLocalizedBooleanPref(const char* path,
304 path,
308 void PrefService::RegisterLocalizedIntegerPref(const char* path,
311 path,
315 void PrefService::RegisterLocalizedDoublePref(const char* path,
318 path,
322 void PrefService::RegisterLocalizedStringPref(const char* path,
325 path,
329 bool PrefService::GetBoolean(const char* path) const {
334 const Preference* pref = FindPreference(path);
336 NOTREACHED() << "Trying to read an unregistered pref: " << path;
344 int PrefService::GetInteger(const char* path) const {
349 const Preference* pref = FindPreference(path);
351 NOTREACHED() << "Trying to read an unregistered pref: " << path;
359 double PrefService::GetDouble(const char* path) const {
364 const Preference* pref = FindPreference(path);
366 NOTREACHED() << "Trying to read an unregistered pref: " << path;
374 std::string PrefService::GetString(const char* path) const {
379 const Preference* pref = FindPreference(path);
381 NOTREACHED() << "Trying to read an unregistered pref: " << path;
389 FilePath PrefService::GetFilePath(const char* path) const {
394 const Preference* pref = FindPreference(path);
396 NOTREACHED() << "Trying to read an unregistered pref: " << path;
404 bool PrefService::HasPrefPath(const char* path) const {
405 const Preference* pref = FindPreference(path);
447 const DictionaryValue* PrefService::GetDictionary(const char* path) const {
450 const Preference* pref = FindPreference(path);
452 NOTREACHED() << "Trying to read an unregistered pref: " << path;
463 const ListValue* PrefService::GetList(const char* path) const {
466 const Preference* pref = FindPreference(path);
468 NOTREACHED() << "Trying to read an unregistered pref: " << path;
479 void PrefService::AddPrefObserver(const char* path,
481 pref_notifier_->AddPrefObserver(path, obs);
484 void PrefService::RemovePrefObserver(const char* path,
486 pref_notifier_->RemovePrefObserver(path, obs);
489 void PrefService::RegisterPreference(const char* path, Value* default_value) {
492 // The main code path takes ownership, but most don't. We'll be safe.
495 if (FindPreference(path)) {
496 NOTREACHED() << "Tried to register duplicate pref " << path;
505 default_store_->SetDefaultValue(path, scoped_value.release());
508 void PrefService::ClearPref(const char* path) {
511 const Preference* pref = FindPreference(path);
513 NOTREACHED() << "Trying to clear an unregistered pref: " << path;
516 user_pref_store_->RemoveValue(path);
519 void PrefService::Set(const char* path, const Value& value) {
522 const Preference* pref = FindPreference(path);
524 NOTREACHED() << "Trying to write an unregistered pref: " << path;
529 NOTREACHED() << "Trying to set pref " << path
533 user_pref_store_->SetValue(path, value.DeepCopy());
537 void PrefService::SetBoolean(const char* path, bool value) {
538 SetUserPrefValue(path, Value::CreateBooleanValue(value));
541 void PrefService::SetInteger(const char* path, int value) {
542 SetUserPrefValue(path, Value::CreateIntegerValue(value));
545 void PrefService::SetDouble(const char* path, double value) {
546 SetUserPrefValue(path, Value::CreateDoubleValue(value));
549 void PrefService::SetString(const char* path, const std::string& value) {
550 SetUserPrefValue(path, Value::CreateStringValue(value));
553 void PrefService::SetFilePath(const char* path, const FilePath& value) {
554 SetUserPrefValue(path, base::CreateFilePathValue(value));
557 void PrefService::SetList(const char* path, ListValue* value) {
558 SetUserPrefValue(path, value);
561 void PrefService::SetInt64(const char* path, int64 value) {
562 SetUserPrefValue(path, Value::CreateStringValue(base::Int64ToString(value)));
565 int64 PrefService::GetInt64(const char* path) const {
568 const Preference* pref = FindPreference(path);
570 NOTREACHED() << "Trying to read an unregistered pref: " << path;
582 void PrefService::RegisterInt64Pref(const char* path, int64 default_value) {
584 path, Value::CreateStringValue(base::Int64ToString(default_value)));
587 Value* PrefService::GetMutableUserPref(const char* path,
591 DLOG_IF(WARNING, IsManagedPreference(path)) <<
592 "Attempt to change managed preference " << path;
594 const Preference* pref = FindPreference(path);
596 NOTREACHED() << "Trying to get an unregistered pref: " << path;
600 NOTREACHED() << "Wrong type for GetMutableValue: " << path;
607 if (user_pref_store_->GetMutableValue(path, &value)
617 user_pref_store_->SetValueSilently(path, value);
626 void PrefService::SetUserPrefValue(const char* path, Value* new_value) {
628 DLOG_IF(WARNING, IsManagedPreference(path)) <<
629 "Attempt to change managed preference " << path;
631 const Preference* pref = FindPreference(path);
633 NOTREACHED() << "Trying to write an unregistered pref: " << path;
637 NOTREACHED() << "Trying to set pref " << path
643 user_pref_store_->SetValue(path, new_value);