Fix copyright lines
[folly.git] / folly / io / async / test / MockAsyncTransport.h
index 80f5022b30db176d88db1727ce91f9caa788510b..6c7d219ca810c7c0b8914a26a80e942e5bbed509 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2015-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -77,15 +77,15 @@ class MockReadCallback: public AsyncTransportWrapper::ReadCallback {
   GMOCK_METHOD1_(, noexcept, , readDataAvailable, void(size_t));
   GMOCK_METHOD0_(, noexcept, , isBufferMovable, bool());
   GMOCK_METHOD1_(, noexcept, ,
-      readBufferAvailableInternal, void(std::shared_ptr<folly::IOBuf>));
+      readBufferAvailableInternal,
+      void(std::unique_ptr<folly::IOBuf>&));
   GMOCK_METHOD0_(, noexcept, , readEOF, void());
   GMOCK_METHOD1_(, noexcept, , readErr,
                  void(const AsyncSocketException&));
 
   void readBufferAvailable(std::unique_ptr<folly::IOBuf> readBuf)
     noexcept override {
-    readBufferAvailableInternal(
-        folly::to_shared_ptr(std::move(readBuf)));
+    readBufferAvailableInternal(readBuf);
   }
 };
 
@@ -96,4 +96,5 @@ class MockWriteCallback: public AsyncTransportWrapper::WriteCallback {
                  void(size_t, const AsyncSocketException&));
 };
 
-}}
+} // namespace test
+} // namespace folly