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 <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 #include "mojo/services/network/public/interfaces/network_error.mojom.h" | 12 #include "mojo/services/network/public/interfaces/network_error.mojom.h" |
11 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
12 | 14 |
13 namespace mojo { | 15 namespace mojo { |
14 | 16 |
15 // These adapters are used to transfer data between a Mojo pipe and the net | 17 // 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: | 18 // library. There are four adapters, one for each end in each direction: |
17 // | 19 // |
18 // Mojo pipe Data flow Network library | 20 // Mojo pipe Data flow Network library |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 124 |
123 scoped_refptr<MojoToNetPendingBuffer> pending_buffer_; | 125 scoped_refptr<MojoToNetPendingBuffer> pending_buffer_; |
124 }; | 126 }; |
125 | 127 |
126 // Creates a new Mojo network error object from a net error code. | 128 // Creates a new Mojo network error object from a net error code. |
127 NetworkErrorPtr MakeNetworkError(int error_code); | 129 NetworkErrorPtr MakeNetworkError(int error_code); |
128 | 130 |
129 } // namespace mojo | 131 } // namespace mojo |
130 | 132 |
131 #endif // MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ | 133 #endif // MOJO_SERVICES_NETWORK_NET_ADAPTERS_H_ |
OLD | NEW |