diff options
author | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 01:41:54 +0000 |
---|---|---|
committer | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 01:41:54 +0000 |
commit | 57182ec220ef3e37b5e4b0ee3b0937c5dc0c7af8 (patch) | |
tree | 6ff7666a8c0b93ee0eb7daaacff10231d294f96c /dbus/property.h | |
parent | 105aef7f5793621e25b7956866e3bc3c55a27ced (diff) | |
download | chromium_src-57182ec220ef3e37b5e4b0ee3b0937c5dc0c7af8.zip chromium_src-57182ec220ef3e37b5e4b0ee3b0937c5dc0c7af8.tar.gz chromium_src-57182ec220ef3e37b5e4b0ee3b0937c5dc0c7af8.tar.bz2 |
D-Bus: notify properties changed from fakes
Call the property changed callback when fakes use ReplaceValue() or
ReplaceValueWithSetValue(), since the actual implementation will
always call the callback.
This avoids issues with property changed notifications being missing
when properties structures are built within fakes.
BUG=none
TEST=dbus_unittests, device_unittests
R=satorux@chromium.org, youngki@chromium.org
Review URL: https://codereview.chromium.org/14443003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/property.h')
-rw-r--r-- | dbus/property.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dbus/property.h b/dbus/property.h index f2feb05..9f5af48 100644 --- a/dbus/property.h +++ b/dbus/property.h @@ -386,11 +386,17 @@ class CHROME_DBUS_EXPORT Property : public PropertyBase { // Method used by test and stub implementations of dbus::PropertySet::Set // to replace the property value with the set value without using a // dbus::MessageReader. - virtual void ReplaceValueWithSetValue() { value_ = set_value_; } + virtual void ReplaceValueWithSetValue() { + value_ = set_value_; + property_set()->NotifyPropertyChanged(name()); + } // Method used by test and stub implementations to directly set the // value of a property. - void ReplaceValue(const T& value) { value_ = value; } + void ReplaceValue(const T& value) { + value_ = value; + property_set()->NotifyPropertyChanged(name()); + } private: // Current cached value of the property. |