OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_BASE_TEST_COMPLETION_CALLBACK_H_ | 5 #ifndef NET_BASE_TEST_COMPLETION_CALLBACK_H_ |
6 #define NET_BASE_TEST_COMPLETION_CALLBACK_H_ | 6 #define NET_BASE_TEST_COMPLETION_CALLBACK_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/tuple.h" | 9 #include "base/tuple.h" |
10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 DISALLOW_COPY_AND_ASSIGN(TestInt64CompletionCallback); | 110 DISALLOW_COPY_AND_ASSIGN(TestInt64CompletionCallback); |
111 }; | 111 }; |
112 | 112 |
113 // Makes sure that the buffer is not referenced when the callback runs. | 113 // Makes sure that the buffer is not referenced when the callback runs. |
114 class ReleaseBufferCompletionCallback: public TestCompletionCallback { | 114 class ReleaseBufferCompletionCallback: public TestCompletionCallback { |
115 public: | 115 public: |
116 explicit ReleaseBufferCompletionCallback(IOBuffer* buffer); | 116 explicit ReleaseBufferCompletionCallback(IOBuffer* buffer); |
117 virtual ~ReleaseBufferCompletionCallback(); | 117 virtual ~ReleaseBufferCompletionCallback(); |
118 | 118 |
119 private: | 119 private: |
120 virtual void SetResult(int result) OVERRIDE; | 120 virtual void SetResult(int result) override; |
121 | 121 |
122 IOBuffer* buffer_; | 122 IOBuffer* buffer_; |
123 DISALLOW_COPY_AND_ASSIGN(ReleaseBufferCompletionCallback); | 123 DISALLOW_COPY_AND_ASSIGN(ReleaseBufferCompletionCallback); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace net | 126 } // namespace net |
127 | 127 |
128 #endif // NET_BASE_TEST_COMPLETION_CALLBACK_H_ | 128 #endif // NET_BASE_TEST_COMPLETION_CALLBACK_H_ |
OLD | NEW |