| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ | 5 #ifndef NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ |
| 6 #define NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ | 6 #define NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // with multiple simultaneous IO operations. | 108 // with multiple simultaneous IO operations. |
| 109 class CallbackTest : public CallbackRunner< Tuple1<int> > { | 109 class CallbackTest : public CallbackRunner< Tuple1<int> > { |
| 110 public: | 110 public: |
| 111 // Creates a new CallbackTest object. When the callback is called, it will | 111 // Creates a new CallbackTest object. When the callback is called, it will |
| 112 // update |helper| with the result of the call. If |reuse| is false and a | 112 // update |helper| with the result of the call. If |reuse| is false and a |
| 113 // callback is called more than once, or if |reuse| is true and a callback | 113 // callback is called more than once, or if |reuse| is true and a callback |
| 114 // is called more than twice, an error will be reported to |helper|. | 114 // is called more than twice, an error will be reported to |helper|. |
| 115 CallbackTest(MessageLoopHelper* helper, bool reuse); | 115 CallbackTest(MessageLoopHelper* helper, bool reuse); |
| 116 virtual ~CallbackTest(); | 116 virtual ~CallbackTest(); |
| 117 | 117 |
| 118 virtual void RunWithParams(const Tuple1<int>& params); | 118 virtual void RunWithParams(const Tuple1<int>& params) OVERRIDE; |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 MessageLoopHelper* helper_; | 121 MessageLoopHelper* helper_; |
| 122 int reuse_; | 122 int reuse_; |
| 123 DISALLOW_COPY_AND_ASSIGN(CallbackTest); | 123 DISALLOW_COPY_AND_ASSIGN(CallbackTest); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ | 126 #endif // NET_DISK_CACHE_DISK_CACHE_TEST_UTIL_H_ |
| OLD | NEW |