Index: components/proximity_auth/ble/fake_wire_message.cc |
diff --git a/components/proximity_auth/ble/fake_wire_message.cc b/components/proximity_auth/ble/fake_wire_message.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..193ac04c6496cc7afbac9f0b75a8b5c73e56d11a |
--- /dev/null |
+++ b/components/proximity_auth/ble/fake_wire_message.cc |
@@ -0,0 +1,28 @@ |
+// Copyright 2015 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 <string> |
+ |
+#include "base/macros.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "components/proximity_auth/ble/fake_wire_message.h" |
+#include "components/proximity_auth/wire_message.h" |
+ |
+namespace proximity_auth { |
+ |
+FakeWireMessage::FakeWireMessage(const std::string& payload) |
+ : WireMessage("", payload) { |
+} |
+ |
+scoped_ptr<FakeWireMessage> FakeWireMessage::Deserialize( |
+ const std::string& serialized_message, |
+ bool* is_incomplete_message) { |
+ *is_incomplete_message = false; |
+ return scoped_ptr<FakeWireMessage>(new FakeWireMessage(serialized_message)); |
+} |
+ |
+std::string FakeWireMessage::Serialize() const { |
+ return std::string(payload()); |
+} |
+} |