/external/cronet/components/prefs/ |
D | pref_notifier_impl_unittest.cc | 114 const char pref_name[] = "homepage"; in TEST_F() local 118 notifier.AddPrefObserver(pref_name, &obs1_); in TEST_F() 119 ASSERT_EQ(1u, notifier.CountObserver(pref_name, &obs1_)); in TEST_F() 121 ASSERT_EQ(0u, notifier.CountObserver(pref_name, &obs2_)); in TEST_F() 128 notifier.AddPrefObserver(pref_name, &obs1_); in TEST_F() 129 ASSERT_EQ(1u, notifier.CountObserver(pref_name, &obs1_)); in TEST_F() 131 ASSERT_EQ(0u, notifier.CountObserver(pref_name, &obs2_)); in TEST_F() 137 ASSERT_EQ(1u, notifier.CountObserver(pref_name, &obs1_)); in TEST_F() 139 ASSERT_EQ(0u, notifier.CountObserver(pref_name, &obs2_)); in TEST_F() 143 notifier.AddPrefObserver(pref_name, &obs2_); in TEST_F() [all …]
|
D | pref_service_unittest.cc | 38 const char pref_name[] = "homepage"; in TEST() local 39 prefs.registry()->RegisterStringPref(pref_name, std::string()); in TEST() 45 registrar.Add(pref_name, obs.GetCallback()); in TEST() 49 obs.Expect(pref_name, &expected_value); in TEST() 50 prefs.SetString(pref_name, new_pref_value); in TEST() 56 prefs.SetString(pref_name, new_pref_value); in TEST() 61 obs.Expect(pref_name, &expected_default_value); in TEST() 62 prefs.ClearPref(pref_name); in TEST() 67 prefs.ClearPref(pref_name); in TEST() 90 const char pref_name[] = "homepage"; in TEST() local [all …]
|
D | pref_member.cc | 27 void PrefMemberBase::Init(const std::string& pref_name, in Init() argument 31 Init(pref_name, prefs); in Init() 34 void PrefMemberBase::Init(const std::string& pref_name, PrefService* prefs) { in Init() argument 38 pref_name_ = pref_name; in Init() 40 DCHECK(prefs_->FindPreference(pref_name_)) << pref_name << " not registered."; in Init() 43 prefs_->AddPrefObserver(pref_name, this); in Init() 63 const std::string& pref_name) { in OnPreferenceChanged() argument 66 ? base::BindOnce(observer_, pref_name) in OnPreferenceChanged() 90 const std::string& pref_name) { in InvokeUnnamedCallback() argument 151 prefs()->SetBoolean(pref_name(), value); in UpdatePref() [all …]
|
D | scoped_user_pref_update_unittest.cc | 86 std::string pref_name = "mypref"; in TEST_F() local 87 prefs_.registry()->RegisterDictionaryPref(pref_name, std::move(defaults)); in TEST_F() 88 EXPECT_EQ(2u, prefs_.GetDict(pref_name).size()); in TEST_F() 90 ScopedDictPrefUpdate update(&prefs_, pref_name); in TEST_F() 92 EXPECT_EQ(3u, prefs_.GetDict(pref_name).size()); in TEST_F() 134 std::string pref_name = "mypref"; in TEST_F() local 135 prefs_.registry()->RegisterListPref(pref_name, std::move(defaults)); in TEST_F() 136 EXPECT_EQ(2u, prefs_.GetList(pref_name).size()); in TEST_F() 138 ScopedListPrefUpdate update(&prefs_, pref_name); in TEST_F() 140 EXPECT_EQ(3u, prefs_.GetList(pref_name).size()); in TEST_F()
|
D | pref_member.h | 102 void Init(const std::string& pref_name, 105 void Init(const std::string& pref_name, PrefService* prefs); 116 const std::string& pref_name) override; 131 const std::string& pref_name() const { return pref_name_; } in pref_name() function 137 const std::string& pref_name); 172 void Init(const std::string& pref_name, in Init() argument 175 subtle::PrefMemberBase::Init(pref_name, prefs, observer); in Init() 177 void Init(const std::string& pref_name, in Init() argument 181 pref_name, prefs, in Init() 184 void Init(const std::string& pref_name, PrefService* prefs) { in Init() argument [all …]
|
D | pref_registry.cc | 23 const std::string& pref_name) const { in GetRegistrationFlags() 24 const auto& it = registration_flags_.find(pref_name); in GetRegistrationFlags() 40 void PrefRegistry::SetDefaultPrefValue(const std::string& pref_name, in SetDefaultPrefValue() argument 43 DCHECK(defaults_->GetValue(pref_name, ¤t_value)) in SetDefaultPrefValue() 44 << "Setting default for unregistered pref: " << pref_name; in SetDefaultPrefValue() 46 << "Wrong type for new default: " << pref_name; in SetDefaultPrefValue() 48 defaults_->ReplaceDefaultValue(pref_name, std::move(value)); in SetDefaultPrefValue()
|
D | mock_pref_change_callback.cc | 20 void MockPrefChangeCallback::Expect(const std::string& pref_name, in Expect() argument 22 EXPECT_CALL(*this, OnPreferenceChanged(pref_name)) in Expect() 23 .With(PrefValueMatches(prefs_.get(), pref_name, value)); in Expect()
|
D | mock_pref_change_callback.h | 23 MATCHER_P3(PrefValueMatches, prefs, pref_name, value, "") { 24 const PrefService::Preference* pref = prefs->FindPreference(pref_name); 41 void Expect(const std::string& pref_name,
|
D | pref_notifier_impl.cc | 38 const auto& pref_name = observer_list.first; in ~PrefNotifierImpl() local 40 {"Pref observer for ", pref_name, " found at shutdown."}); in ~PrefNotifierImpl() 50 pref_name == "bookmark_bar.show_on_all_tabs" || in ~PrefNotifierImpl() 52 pref_name == "profile.icon_version") { in ~PrefNotifierImpl()
|
D | pref_service.cc | 246 const std::string& pref_name) const { in FindPreference() 248 auto it = prefs_map_.find(pref_name); in FindPreference() 252 if (!pref_registry_->defaults()->GetValue(pref_name, &default_value)) in FindPreference() 256 pref_name, Preference(this, pref_name, default_value->type()))) in FindPreference() 288 bool PrefService::IsManagedPreference(const std::string& pref_name) const { in IsManagedPreference() 289 const Preference* pref = FindPreference(pref_name); in IsManagedPreference() 294 const std::string& pref_name) const { in IsPreferenceManagedByCustodian() 295 const Preference* pref = FindPreference(pref_name); in IsPreferenceManagedByCustodian() 300 const std::string& pref_name) const { in IsUserModifiablePreference() 301 const Preference* pref = FindPreference(pref_name); in IsUserModifiablePreference()
|
D | pref_change_registrar.h | 69 const std::string& pref_name) override; 72 const std::string& pref_name);
|
D | pref_registry.h | 64 uint32_t GetRegistrationFlags(const std::string& pref_name) const; 76 void SetDefaultPrefValue(const std::string& pref_name, base::Value value);
|
D | pref_member_unittest.cc | 43 void Init(const std::string& pref_name, PrefService* prefs) { in Init() argument 44 pref_.Init(pref_name, prefs); in Init() 88 void OnPreferenceChanged(const std::string& pref_name) { in OnPreferenceChanged() argument 89 EXPECT_EQ(pref_name, kStringPref); in OnPreferenceChanged()
|
D | pref_service.h | 223 bool IsManagedPreference(const std::string& pref_name) const; 227 bool IsPreferenceManagedByCustodian(const std::string& pref_name) const; 231 bool IsUserModifiablePreference(const std::string& pref_name) const;
|
D | pref_observer.h | 18 const std::string& pref_name) = 0;
|
D | pref_notifier.h | 20 virtual void OnPreferenceChanged(const std::string& pref_name) = 0;
|
/external/cronet/components/metrics/ |
D | date_changed_helper.cc | 22 const char* pref_name, in UpdateStoredDate() argument 24 prefs->SetTime(pref_name, GetCurrentDate(now)); in UpdateStoredDate() 28 const char* pref_name, in IsStoredDateToday() argument 30 base::Time stored_date = prefs->GetTime(pref_name); in IsStoredDateToday() 33 UpdateStoredDate(prefs, pref_name, GetCurrentDate(now)); in IsStoredDateToday() 44 bool HasDateChangedSinceLastCall(PrefService* prefs, const char* pref_name) { in HasDateChangedSinceLastCall() argument 46 DCHECK(pref_name); in HasDateChangedSinceLastCall() 48 if (IsStoredDateToday(prefs, pref_name, now)) in HasDateChangedSinceLastCall() 50 UpdateStoredDate(prefs, pref_name, now); in HasDateChangedSinceLastCall() 54 void RegisterPref(PrefRegistrySimple* registry, const char* pref_name) { in RegisterPref() argument [all …]
|
D | data_use_tracker.cc | 101 void DataUseTracker::UpdateUsagePref(const std::string& pref_name, in UpdateUsagePref() argument 105 ScopedDictPrefUpdate pref_updater(local_state_, pref_name); in UpdateUsagePref() 108 const base::Value::Dict& user_pref_dict = local_state_->GetDict(pref_name); in UpdateUsagePref() 119 void DataUseTracker::RemoveExpiredEntriesForPref(const std::string& pref_name) { in RemoveExpiredEntriesForPref() argument 122 const base::Value::Dict& user_pref_dict = local_state_->GetDict(pref_name); in RemoveExpiredEntriesForPref() 134 local_state_->SetDict(pref_name, std::move(user_pref_new_dict)); in RemoveExpiredEntriesForPref() 141 int DataUseTracker::ComputeTotalDataUse(const std::string& pref_name) { in ComputeTotalDataUse() argument 145 const base::Value::Dict& pref_dict = local_state_->GetDict(pref_name); in ComputeTotalDataUse()
|
D | daily_event.cc | 34 const char* pref_name, in DailyEvent() argument 37 pref_name_(pref_name), in DailyEvent() 46 const std::string& pref_name) { in RegisterPref() argument 47 registry->RegisterInt64Pref(pref_name, 0); in RegisterPref()
|
D | data_use_tracker.h | 62 void UpdateUsagePref(const std::string& pref_name, int message_size); 69 void RemoveExpiredEntriesForPref(const std::string& pref_name); 73 int ComputeTotalDataUse(const std::string& pref_name);
|
D | date_changed_helper.h | 20 const char* pref_name); 23 void RegisterPref(PrefRegistrySimple* registry, const char* pref_name);
|
D | daily_event.h | 63 const char* pref_name, 81 const std::string& pref_name);
|
/external/cronet/components/prefs/ios/ |
D | pref_observer_bridge.mm | 20 const std::string& pref_name, 24 registrar->Add(pref_name.c_str(), callback); 27 void PrefObserverBridge::OnPreferenceChanged(const std::string& pref_name) { 28 [delegate_ onPreferenceChanged:pref_name];
|
D | pref_observer_bridge.h | 23 virtual void ObserveChangesForPreference(const std::string& pref_name, 27 virtual void OnPreferenceChanged(const std::string& pref_name);
|
/external/cronet/components/cronet/ |
D | host_cache_persistence_manager.cc | 19 std::string pref_name, in HostCachePersistenceManager() argument 24 pref_name_(pref_name), in HostCachePersistenceManager()
|