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

Unified Diff: components/arc/test/fake_arc_bridge_bootstrap.cc

Issue 1684063002: Add ArcEnabled policy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@26869593
Patch Set: Added browser test. 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
Index: components/arc/test/fake_arc_bridge_bootstrap.cc
diff --git a/components/arc/test/fake_arc_bridge_bootstrap.cc b/components/arc/test/fake_arc_bridge_bootstrap.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8ce2a52a7691c2d6bca9e81f2282e4ee7355567a
--- /dev/null
+++ b/components/arc/test/fake_arc_bridge_bootstrap.cc
@@ -0,0 +1,31 @@
+// Copyright 2016 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.
+
+#include "components/arc/test/fake_arc_bridge_bootstrap.h"
+
+#include <utility>
+
+#include "base/bind.h"
bartfab (slow) 2016/03/02 14:45:41 Nit: Not used.
Polina Bondarenko 2016/03/06 20:22:33 Done.
+#include "base/bind_helpers.h"
bartfab (slow) 2016/03/02 14:45:41 Nit: Not used.
Polina Bondarenko 2016/03/06 20:22:33 Done.
+#include "components/arc/test/fake_arc_bridge_instance.h"
+
+namespace arc {
+
+FakeArcBridgeBootstrap::FakeArcBridgeBootstrap(FakeArcBridgeInstance* instance)
+ : instance_(instance) {}
bartfab (slow) 2016/03/02 14:45:41 Nit: If a method declaration is not inline, the cl
Polina Bondarenko 2016/03/06 20:22:33 Done.
+
+void FakeArcBridgeBootstrap::Start() {
+ DCHECK(delegate_);
bartfab (slow) 2016/03/02 14:45:41 Nit: #include "base/logging.h"
Polina Bondarenko 2016/03/06 20:22:33 Done.
+ ArcBridgeInstancePtr instance;
bartfab (slow) 2016/03/02 14:45:41 Nit: #include "components/arc/common/arc_bridge.mo
Polina Bondarenko 2016/03/06 20:22:33 Done.
+ instance_->Bind(mojo::GetProxy(&instance));
bartfab (slow) 2016/03/02 14:45:41 Nit: #include "mojo/public/cpp/bindings/interface_
Polina Bondarenko 2016/03/06 20:22:33 Done.
+ delegate_->OnConnectionEstablished(std::move(instance));
+}
+
+void FakeArcBridgeBootstrap::Stop() {
+ DCHECK(delegate_);
+ instance_->Unbind();
+ delegate_->OnStopped();
+}
+
+} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698