shill: vpn: Disconnect VPN service when underlying connection disconnects.

BUG=chromium-os:30737,chromium-os:30774
TEST=unit tests, tested on device with 000OpenVPNGenesis

Change-Id: Ib350cb23edd3e68b3bd5390378789a6b60857b80
Reviewed-on: https://gerrit.chromium.org/gerrit/22461
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/vpn_service.h b/vpn_service.h
index b7b456a..f8edfc9 100644
--- a/vpn_service.h
+++ b/vpn_service.h
@@ -8,6 +8,7 @@
 #include <base/memory/scoped_ptr.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
+#include "shill/connection.h"
 #include "shill/service.h"
 
 namespace shill {
@@ -33,6 +34,7 @@
   virtual bool Save(StoreInterface *storage);
   virtual bool Unload();
   virtual void MakeFavorite();
+  virtual void SetConnection(const ConnectionRefPtr &connection);
 
   virtual void InitDriverPropertyStore();
 
@@ -44,11 +46,13 @@
 
  private:
   FRIEND_TEST(VPNServiceTest, GetDeviceRpcId);
+  FRIEND_TEST(VPNServiceTest, SetConnection);
 
   virtual std::string GetDeviceRpcId(Error *error);
 
   std::string storage_id_;
   scoped_ptr<VPNDriver> driver_;
+  scoped_ptr<Connection::Binder> connection_binder_;
 
   // Provided only for compatibility.  crosbug.com/29286
   std::string vpn_domain_;