 Chromium Code Reviews
 Chromium Code Reviews Issue 681723003:
  Add new shill client for VPN  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 681723003:
  Add new shill client for VPN  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chromeos/dbus/shill_third_party_vpn_observer.h | 
| diff --git a/chromeos/dbus/shill_third_party_vpn_observer.h b/chromeos/dbus/shill_third_party_vpn_observer.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..e9b4cc8cfdd61a4a28cfd0be6793748119fe960f | 
| --- /dev/null | 
| +++ b/chromeos/dbus/shill_third_party_vpn_observer.h | 
| @@ -0,0 +1,28 @@ | 
| +// Copyright 2014 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_ | 
| +#define CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_ | 
| + | 
| +#include "base/basictypes.h" | 
| 
pneubeck (no reviews)
2014/11/11 13:09:35
should be base/macros.h
instead.
 
kaliamoorthi
2014/11/11 14:58:34
This is for uint32
 | 
| + | 
| +namespace chromeos { | 
| + | 
| +// This is a base class for observers which handle signals sent by the | 
| +// ThirdPartyVpnAdaptor in Shill. | 
| +class ShillThirdPartyVpnObserver { | 
| + public: | 
| + // Ownership of |data| belongs to the caller, hence the contents should be | 
| 
pneubeck (no reviews)
2014/11/11 13:09:35
why not just passing a vector<uint8> or a string i
 
kaliamoorthi
2014/11/11 14:58:34
As we discussed this is to reduce memcpy. I docume
 | 
| + // consumed before the call returns, i.e., pointer should not be dereferenced | 
| + // after the function returns. | 
| + virtual void OnPacketReceived(const uint8* data, size_t length) = 0; | 
| + virtual void OnPlatformMessage(uint32 message) = 0; | 
| + | 
| + protected: | 
| + virtual ~ShillThirdPartyVpnObserver() {} | 
| 
pneubeck (no reviews)
2014/11/11 13:09:35
Add also a 
 private: 
   DISALLOW_ASSIGN
 
kaliamoorthi
2014/11/11 14:58:34
Done.
 | 
| +}; | 
| + | 
| +} // namespace chromeos | 
| + | 
| +#endif // CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_ |