Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Unified Diff: components/arc/net/arc_net_host_impl.h

Issue 1751793002: ARC: Remove error status setting in GetNetworks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/arc/net/arc_net_host_impl.cc » ('j') | components/arc/net/arc_net_host_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | components/arc/net/arc_net_host_impl.cc » ('j') | components/arc/net/arc_net_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698