Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: net/http/disk_cache_based_quic_server_info.h

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 // our standard disk cache. Since the information is defined to be 24 // our standard disk cache. Since the information is defined to be
25 // non-sensitive, it's ok for us to keep it on disk. 25 // non-sensitive, it's ok for us to keep it on disk.
26 class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo 26 class NET_EXPORT_PRIVATE DiskCacheBasedQuicServerInfo
27 : public QuicServerInfo, 27 : public QuicServerInfo,
28 public NON_EXPORTED_BASE(base::NonThreadSafe) { 28 public NON_EXPORTED_BASE(base::NonThreadSafe) {
29 public: 29 public:
30 DiskCacheBasedQuicServerInfo(const QuicServerId& server_id, 30 DiskCacheBasedQuicServerInfo(const QuicServerId& server_id,
31 HttpCache* http_cache); 31 HttpCache* http_cache);
32 32
33 // QuicServerInfo implementation. 33 // QuicServerInfo implementation.
34 virtual void Start() override; 34 void Start() override;
35 virtual int WaitForDataReady(const CompletionCallback& callback) override; 35 int WaitForDataReady(const CompletionCallback& callback) override;
36 virtual bool IsDataReady() override; 36 bool IsDataReady() override;
37 virtual bool IsReadyToPersist() override; 37 bool IsReadyToPersist() override;
38 virtual void Persist() override; 38 void Persist() override;
39 39
40 private: 40 private:
41 struct CacheOperationDataShim; 41 struct CacheOperationDataShim;
42 enum State { 42 enum State {
43 GET_BACKEND, 43 GET_BACKEND,
44 GET_BACKEND_COMPLETE, 44 GET_BACKEND_COMPLETE,
45 OPEN, 45 OPEN,
46 OPEN_COMPLETE, 46 OPEN_COMPLETE,
47 READ, 47 READ,
48 READ_COMPLETE, 48 READ_COMPLETE,
49 WAIT_FOR_DATA_READY_DONE, 49 WAIT_FOR_DATA_READY_DONE,
50 CREATE_OR_OPEN, 50 CREATE_OR_OPEN,
51 CREATE_OR_OPEN_COMPLETE, 51 CREATE_OR_OPEN_COMPLETE,
52 WRITE, 52 WRITE,
53 WRITE_COMPLETE, 53 WRITE_COMPLETE,
54 SET_DONE, 54 SET_DONE,
55 NONE, 55 NONE,
56 }; 56 };
57 57
58 virtual ~DiskCacheBasedQuicServerInfo(); 58 ~DiskCacheBasedQuicServerInfo() override;
59 59
60 std::string key() const; 60 std::string key() const;
61 61
62 // The |unused| parameter is a small hack so that we can have the 62 // The |unused| parameter is a small hack so that we can have the
63 // CacheOperationDataShim object owned by the Callback that is created for 63 // CacheOperationDataShim object owned by the Callback that is created for
64 // this method. See comment above CacheOperationDataShim for details. 64 // this method. See comment above CacheOperationDataShim for details.
65 void OnIOComplete(CacheOperationDataShim* unused, int rv); 65 void OnIOComplete(CacheOperationDataShim* unused, int rv);
66 66
67 int DoLoop(int rv); 67 int DoLoop(int rv);
68 68
(...skipping 29 matching lines...) Expand all
98 scoped_refptr<IOBuffer> read_buffer_; 98 scoped_refptr<IOBuffer> read_buffer_;
99 scoped_refptr<IOBuffer> write_buffer_; 99 scoped_refptr<IOBuffer> write_buffer_;
100 std::string data_; 100 std::string data_;
101 101
102 base::WeakPtrFactory<DiskCacheBasedQuicServerInfo> weak_factory_; 102 base::WeakPtrFactory<DiskCacheBasedQuicServerInfo> weak_factory_;
103 }; 103 };
104 104
105 } // namespace net 105 } // namespace net
106 106
107 #endif // NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_ 107 #endif // NET_HTTP_DISK_CACHE_BASED_QUIC_SERVER_INFO_H_
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction_unittest.cc ('k') | net/http/failing_http_transaction_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698