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 NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ | 5 #ifndef NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ |
6 #define NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ | 6 #define NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // the current thread when ready. | 38 // the current thread when ready. |
39 // | 39 // |
40 // Only a single callback can be outstanding at a given time and, in the | 40 // Only a single callback can be outstanding at a given time and, in the |
41 // event that WaitForDataReady returns OK, it's the caller's responsibility | 41 // event that WaitForDataReady returns OK, it's the caller's responsibility |
42 // to delete |callback|. | 42 // to delete |callback|. |
43 // | 43 // |
44 // |callback| may be NULL, in which case ERR_IO_PENDING may still be returned | 44 // |callback| may be NULL, in which case ERR_IO_PENDING may still be returned |
45 // but, obviously, a callback will never be made. | 45 // but, obviously, a callback will never be made. |
46 virtual int WaitForDataReady(const CompletionCallback& callback) = 0; | 46 virtual int WaitForDataReady(const CompletionCallback& callback) = 0; |
47 | 47 |
| 48 // Reset's WaitForDataReady callback. This method shouldn't have any side |
| 49 // effects (could be called even if HttpCache doesn't exist). |
| 50 virtual void ResetWaitForDataReadyCallback() = 0; |
| 51 |
48 // Cancel's WaitForDataReady callback. |callback| passed in WaitForDataReady | 52 // Cancel's WaitForDataReady callback. |callback| passed in WaitForDataReady |
49 // will not be called. | 53 // will not be called. |
50 virtual void CancelWaitForDataReadyCallback() = 0; | 54 virtual void CancelWaitForDataReadyCallback() = 0; |
51 | 55 |
52 // Returns true if data is loaded from disk cache and ready (WaitForDataReady | 56 // Returns true if data is loaded from disk cache and ready (WaitForDataReady |
53 // doesn't have a pending callback). | 57 // doesn't have a pending callback). |
54 virtual bool IsDataReady() = 0; | 58 virtual bool IsDataReady() = 0; |
55 | 59 |
56 // Returns true if the object is ready to persist data, in other words, if | 60 // Returns true if the object is ready to persist data, in other words, if |
57 // data is loaded from disk cache and ready and there are no pending writes. | 61 // data is loaded from disk cache and ready and there are no pending writes. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // GetForServer returns a fresh, allocated QuicServerInfo for the given | 135 // GetForServer returns a fresh, allocated QuicServerInfo for the given |
132 // |server_id| or NULL on failure. | 136 // |server_id| or NULL on failure. |
133 virtual QuicServerInfo* GetForServer(const QuicServerId& server_id) = 0; | 137 virtual QuicServerInfo* GetForServer(const QuicServerId& server_id) = 0; |
134 | 138 |
135 DISALLOW_COPY_AND_ASSIGN(QuicServerInfoFactory); | 139 DISALLOW_COPY_AND_ASSIGN(QuicServerInfoFactory); |
136 }; | 140 }; |
137 | 141 |
138 } // namespace net | 142 } // namespace net |
139 | 143 |
140 #endif // NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ | 144 #endif // NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ |
OLD | NEW |