| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ |
| 6 #define MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ | 6 #define MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "mojo/services/network/public/interfaces/network_error.mojom.h" | |
| 11 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| 11 #include "third_party/mojo/src/mojo/public/interfaces/network/network_error.mojo
m.h" |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 | 14 |
| 15 // These adapters are used to transfer data between a Mojo pipe and the net | 15 // These adapters are used to transfer data between a Mojo pipe and the net |
| 16 // library. There are four adapters, one for each end in each direction: | 16 // library. There are four adapters, one for each end in each direction: |
| 17 // | 17 // |
| 18 // Mojo pipe Data flow Network library | 18 // Mojo pipe Data flow Network library |
| 19 // ---------------------------------------------------------- | 19 // ---------------------------------------------------------- |
| 20 // MojoToNetPendingBuffer ---> MojoToNetIOBuffer | 20 // MojoToNetPendingBuffer ---> MojoToNetIOBuffer |
| 21 // NetToMojoPendingBuffer <--- NetToMojoIOBuffer | 21 // NetToMojoPendingBuffer <--- NetToMojoIOBuffer |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 scoped_refptr<MojoToNetPendingBuffer> pending_buffer_; | 123 scoped_refptr<MojoToNetPendingBuffer> pending_buffer_; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // Creates a new Mojo network error object from a net error code. | 126 // Creates a new Mojo network error object from a net error code. |
| 127 NetworkErrorPtr MakeNetworkError(int error_code); | 127 NetworkErrorPtr MakeNetworkError(int error_code); |
| 128 | 128 |
| 129 } // namespace mojo | 129 } // namespace mojo |
| 130 | 130 |
| 131 #endif // MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ | 131 #endif // MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ |
| OLD | NEW |