Chromium Code Reviews| Index: components/arc/net/arc_net_host_impl.h |
| diff --git a/components/arc/net/arc_net_host_impl.h b/components/arc/net/arc_net_host_impl.h |
| index f078edecfee2b4c198176b99645e60e3238ee836..bdaade4c32020065ba4da18e1d879f322f4cde26 100644 |
| --- a/components/arc/net/arc_net_host_impl.h |
| +++ b/components/arc/net/arc_net_host_impl.h |
| @@ -11,11 +11,13 @@ |
| #include "base/files/scoped_file.h" |
| #include "base/macros.h" |
| +#include "base/synchronization/lock.h" |
| #include "base/threading/thread_checker.h" |
| #include "chromeos/network/network_state_handler_observer.h" |
| #include "components/arc/arc_bridge_service.h" |
| #include "components/arc/arc_service.h" |
| #include "components/arc/common/net.mojom.h" |
| +#include "mojo/public/cpp/bindings/array.h" |
| #include "mojo/public/cpp/bindings/binding.h" |
| namespace arc { |
| @@ -53,10 +55,21 @@ class ArcNetHostImpl : public ArcService, |
| // Overridden from ArcBridgeService::Observer: |
| void OnNetInstanceReady() override; |
| + // Overridden from ArcBridgeService::Observer: |
| + void OnNetInstanceClosed() override; |
| + |
| private: |
| base::ThreadChecker thread_checker_; |
| mojo::Binding<arc::NetHost> binding_; |
| + // Lock to synchronize access to the cached list of visible networks. |
| + base::Lock visible_networks_lock_; |
| + |
| + // List of visible networks that will be sent across to the instance. This |
| + // will be cached in the call to GetNetworks and invalidated when a |
| + // ScanCompleted notification is received. |
| + mojo::Array<arc::WifiConfigurationPtr> cached_visible_networks_; |
|
Luis Héctor Chávez
2016/03/01 16:22:31
I don't love the idea of a move-only collection be
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ArcNetHostImpl); |
| }; |