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

Side by Side Diff: mojo/services/network/net_adapters.h

Issue 668663006: Standardize usage of virtual/override/final in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « mojo/services/network/main.cc ('k') | mojo/services/network/network_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/interfaces/network/network_error.mojom.h" 10 #include "mojo/services/public/interfaces/network/network_error.mojom.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DISALLOW_COPY_AND_ASSIGN(NetToMojoPendingBuffer); 60 DISALLOW_COPY_AND_ASSIGN(NetToMojoPendingBuffer);
61 }; 61 };
62 62
63 // Net side of a Net -> Mojo copy. The data will be read from the network and 63 // Net side of a Net -> Mojo copy. The data will be read from the network and
64 // copied into the buffer associated with the pending mojo write. 64 // copied into the buffer associated with the pending mojo write.
65 class NetToMojoIOBuffer : public net::WrappedIOBuffer { 65 class NetToMojoIOBuffer : public net::WrappedIOBuffer {
66 public: 66 public:
67 explicit NetToMojoIOBuffer(NetToMojoPendingBuffer* pending_buffer); 67 explicit NetToMojoIOBuffer(NetToMojoPendingBuffer* pending_buffer);
68 68
69 private: 69 private:
70 virtual ~NetToMojoIOBuffer(); 70 ~NetToMojoIOBuffer() override;
71 71
72 scoped_refptr<NetToMojoPendingBuffer> pending_buffer_; 72 scoped_refptr<NetToMojoPendingBuffer> pending_buffer_;
73 }; 73 };
74 74
75 // Mojo side of a Mojo -> Net copy. 75 // Mojo side of a Mojo -> Net copy.
76 class MojoToNetPendingBuffer 76 class MojoToNetPendingBuffer
77 : public base::RefCountedThreadSafe<MojoToNetPendingBuffer> { 77 : public base::RefCountedThreadSafe<MojoToNetPendingBuffer> {
78 public: 78 public:
79 // Starts reading from Mojo. 79 // Starts reading from Mojo.
80 // 80 //
(...skipping 30 matching lines...) Expand all
111 DISALLOW_COPY_AND_ASSIGN(MojoToNetPendingBuffer); 111 DISALLOW_COPY_AND_ASSIGN(MojoToNetPendingBuffer);
112 }; 112 };
113 113
114 // Net side of a Mojo -> Net copy. The data will already be in the 114 // Net side of a Mojo -> Net copy. The data will already be in the
115 // MojoToNetPendingBuffer's buffer. 115 // MojoToNetPendingBuffer's buffer.
116 class MojoToNetIOBuffer : public net::WrappedIOBuffer { 116 class MojoToNetIOBuffer : public net::WrappedIOBuffer {
117 public: 117 public:
118 explicit MojoToNetIOBuffer(MojoToNetPendingBuffer* pending_buffer); 118 explicit MojoToNetIOBuffer(MojoToNetPendingBuffer* pending_buffer);
119 119
120 private: 120 private:
121 virtual ~MojoToNetIOBuffer(); 121 ~MojoToNetIOBuffer() override;
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_
OLDNEW
« no previous file with comments | « mojo/services/network/main.cc ('k') | mojo/services/network/network_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698