| Index: extensions/browser/api/vpn_provider/vpn_service.cc
|
| diff --git a/extensions/browser/api/vpn_provider/vpn_service.cc b/extensions/browser/api/vpn_provider/vpn_service.cc
|
| index 7293f7072a5a67628cc728d6e2beffd6dcac39f8..09452d5290f194177562cb6feeeb7b4dba27ac5f 100644
|
| --- a/extensions/browser/api/vpn_provider/vpn_service.cc
|
| +++ b/extensions/browser/api/vpn_provider/vpn_service.cc
|
| @@ -114,8 +114,13 @@ void VpnService::VpnConfiguration::OnPlatformMessage(uint32_t message) {
|
|
|
| api_vpn::PlatformMessage platform_message =
|
| static_cast<api_vpn::PlatformMessage>(message);
|
| - vpn_service_->SetActiveConfiguration(
|
| - platform_message == api_vpn::PLATFORM_MESSAGE_CONNECTED ? this : nullptr);
|
| +
|
| + if (platform_message == api_vpn::PLATFORM_MESSAGE_CONNECTED) {
|
| + vpn_service_->SetActiveConfiguration(this);
|
| + } else if (platform_message == api_vpn::PLATFORM_MESSAGE_DISCONNECTED ||
|
| + platform_message == api_vpn::PLATFORM_MESSAGE_ERROR) {
|
| + vpn_service_->SetActiveConfiguration(nullptr);
|
| + }
|
|
|
| // TODO(kaliamoorthi): Update the lower layers to get the error message and
|
| // pass in the error instead of std::string().
|
|
|