Chromium Code Reviews| Index: services/ui/public/cpp/in_flight_change.cc |
| diff --git a/services/ui/public/cpp/in_flight_change.cc b/services/ui/public/cpp/in_flight_change.cc |
| index 1eef7487789daaa3a4d6d5dbef03158140e05de4..383d70d6ab84d31fe1c978b89be74a692675ab4d 100644 |
| --- a/services/ui/public/cpp/in_flight_change.cc |
| +++ b/services/ui/public/cpp/in_flight_change.cc |
| @@ -138,10 +138,10 @@ void InFlightFocusChange::Revert() { |
| InFlightPropertyChange::InFlightPropertyChange( |
| Window* window, |
| const std::string& property_name, |
| - const mojo::Array<uint8_t>& revert_value) |
| + const base::Optional<std::vector<uint8_t>>& revert_value) |
| : InFlightChange(window, ChangeType::PROPERTY), |
| property_name_(property_name), |
| - revert_value_(revert_value.Clone()) {} |
| + revert_value_(revert_value) {} |
| InFlightPropertyChange::~InFlightPropertyChange() {} |
| @@ -152,12 +152,12 @@ bool InFlightPropertyChange::Matches(const InFlightChange& change) const { |
| void InFlightPropertyChange::SetRevertValueFrom(const InFlightChange& change) { |
| revert_value_ = |
| - static_cast<const InFlightPropertyChange&>(change).revert_value_.Clone(); |
| + static_cast<const InFlightPropertyChange&>(change).revert_value_; |
| } |
| void InFlightPropertyChange::Revert() { |
| - WindowPrivate(window()) |
| - .LocalSetSharedProperty(property_name_, std::move(revert_value_)); |
| + WindowPrivate(window()).LocalSetSharedProperty( |
| + property_name_, revert_value_ ? &*revert_value_ : nullptr); |
|
yzshen1
2017/01/06 19:38:38
nit: it seems easier to read: &revert_value_.value
Sam McNally
2017/01/09 23:15:15
Done.
|
| } |
| // InFlightPredefinedCursorChange --------------------------------------------- |