| 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_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ | 5 #ifndef NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ |
| 6 #define NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ | 6 #define NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo | 25 class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo |
| 26 : public QuicServerInfo, | 26 : public QuicServerInfo, |
| 27 public NON_EXPORTED_BASE(base::NonThreadSafe) { | 27 public NON_EXPORTED_BASE(base::NonThreadSafe) { |
| 28 public: | 28 public: |
| 29 DiskCacheBasedQuicServerInfo(const std::string& hostname, | 29 DiskCacheBasedQuicServerInfo(const std::string& hostname, |
| 30 HttpCache* http_cache); | 30 HttpCache* http_cache); |
| 31 | 31 |
| 32 // QuicServerInfo implementation. | 32 // QuicServerInfo implementation. |
| 33 virtual void Start() OVERRIDE; | 33 virtual void Start() OVERRIDE; |
| 34 virtual int WaitForDataReady(const CompletionCallback& callback) OVERRIDE; | 34 virtual int WaitForDataReady(const CompletionCallback& callback) OVERRIDE; |
| 35 virtual bool IsDataReady() OVERRIDE; |
| 35 virtual void Persist() OVERRIDE; | 36 virtual void Persist() OVERRIDE; |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 struct CacheOperationDataShim; | 39 struct CacheOperationDataShim; |
| 39 enum State { | 40 enum State { |
| 40 GET_BACKEND, | 41 GET_BACKEND, |
| 41 GET_BACKEND_COMPLETE, | 42 GET_BACKEND_COMPLETE, |
| 42 OPEN, | 43 OPEN, |
| 43 OPEN_COMPLETE, | 44 OPEN_COMPLETE, |
| 44 READ, | 45 READ, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 disk_cache::Entry* entry_; | 95 disk_cache::Entry* entry_; |
| 95 CompletionCallback user_callback_; | 96 CompletionCallback user_callback_; |
| 96 scoped_refptr<IOBuffer> read_buffer_; | 97 scoped_refptr<IOBuffer> read_buffer_; |
| 97 scoped_refptr<IOBuffer> write_buffer_; | 98 scoped_refptr<IOBuffer> write_buffer_; |
| 98 std::string data_; | 99 std::string data_; |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace net | 102 } // namespace net |
| 102 | 103 |
| 103 #endif // NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ | 104 #endif // NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ |
| OLD | NEW |