| Index: chromeos/dbus/update_engine_client.cc
|
| diff --git a/chromeos/dbus/update_engine_client.cc b/chromeos/dbus/update_engine_client.cc
|
| index d772d0074513b7cbf9ddf6cd6ab55430c37faf95..23646c606bc583016a10e47f68940766194783b4 100644
|
| --- a/chromeos/dbus/update_engine_client.cc
|
| +++ b/chromeos/dbus/update_engine_client.cc
|
| @@ -218,6 +218,17 @@ class UpdateEngineClientImpl : public UpdateEngineClient {
|
| weak_ptr_factory_.GetWeakPtr(), callback));
|
| }
|
|
|
| + std::unique_ptr<dbus::Response> SetUpdateOverCellularPermission(
|
| + bool allowed) override {
|
| + dbus::MethodCall method_call(
|
| + update_engine::kUpdateEngineInterface,
|
| + update_engine::kSetUpdateOverCellularPermission);
|
| + VLOG(1) << "Requesting UpdateEngine to " << (allowed ? "allow" : "prohibit")
|
| + << " updates over cellular.";
|
| + return update_engine_proxy_->CallMethodAndBlock(
|
| + &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT);
|
| + }
|
| +
|
| protected:
|
| void Init(dbus::Bus* bus) override {
|
| update_engine_proxy_ = bus->GetObjectProxy(
|
| @@ -449,7 +460,8 @@ class UpdateEngineClientStubImpl : public UpdateEngineClient {
|
| public:
|
| UpdateEngineClientStubImpl()
|
| : current_channel_(kReleaseChannelBeta),
|
| - target_channel_(kReleaseChannelBeta) {}
|
| + target_channel_(kReleaseChannelBeta),
|
| + method_call_("com.example.Interface", "SomeMethod") {}
|
|
|
| // UpdateEngineClient implementation:
|
| void Init(dbus::Bus* bus) override {}
|
| @@ -487,8 +499,14 @@ class UpdateEngineClientStubImpl : public UpdateEngineClient {
|
| callback.Run(update_engine::EndOfLifeStatus::kSupported);
|
| }
|
|
|
| + std::unique_ptr<dbus::Response> SetUpdateOverCellularPermission(
|
| + bool allowed) override {
|
| + return dbus::Response::FromMethodCall(&method_call_);
|
| + }
|
| +
|
| std::string current_channel_;
|
| std::string target_channel_;
|
| + dbus::MethodCall method_call_;
|
| };
|
|
|
| // The UpdateEngineClient implementation used on Linux desktop, which
|
|
|