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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 private: | 100 private: |
101 const base::Closure closure_; | 101 const base::Closure closure_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(TestClosure); | 103 DISALLOW_COPY_AND_ASSIGN(TestClosure); |
104 }; | 104 }; |
105 | 105 |
106 // Base class overridden by custom implementations of TestCompletionCallback. | 106 // Base class overridden by custom implementations of TestCompletionCallback. |
107 typedef internal::TestCompletionCallbackTemplate<int> | 107 typedef internal::TestCompletionCallbackTemplate<int> |
108 TestCompletionCallbackBase; | 108 TestCompletionCallbackBase; |
109 | 109 |
110 typedef internal::TestCompletionCallbackTemplate<int64> | 110 typedef internal::TestCompletionCallbackTemplate<int64_t> |
111 TestInt64CompletionCallbackBase; | 111 TestInt64CompletionCallbackBase; |
112 | 112 |
113 class TestCompletionCallback : public TestCompletionCallbackBase { | 113 class TestCompletionCallback : public TestCompletionCallbackBase { |
114 public: | 114 public: |
115 TestCompletionCallback(); | 115 TestCompletionCallback(); |
116 ~TestCompletionCallback() override; | 116 ~TestCompletionCallback() override; |
117 | 117 |
118 const CompletionCallback& callback() const { return callback_; } | 118 const CompletionCallback& callback() const { return callback_; } |
119 | 119 |
120 private: | 120 private: |
(...skipping 24 matching lines...) Expand all Loading... |
145 private: | 145 private: |
146 void SetResult(int result) override; | 146 void SetResult(int result) override; |
147 | 147 |
148 IOBuffer* buffer_; | 148 IOBuffer* buffer_; |
149 DISALLOW_COPY_AND_ASSIGN(ReleaseBufferCompletionCallback); | 149 DISALLOW_COPY_AND_ASSIGN(ReleaseBufferCompletionCallback); |
150 }; | 150 }; |
151 | 151 |
152 } // namespace net | 152 } // namespace net |
153 | 153 |
154 #endif // NET_BASE_TEST_COMPLETION_CALLBACK_H_ | 154 #endif // NET_BASE_TEST_COMPLETION_CALLBACK_H_ |
OLD | NEW |