OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_HTTP_CACHE_LOOKUP_MANAGER_H_ | 5 #ifndef NET_HTTP_HTTP_CACHE_LOOKUP_MANAGER_H_ |
6 #define NET_HTTP_HTTP_CACHE_LOOKUP_MANAGER_H_ | 6 #define NET_HTTP_HTTP_CACHE_LOOKUP_MANAGER_H_ |
7 | 7 |
8 #include "net/base/net_export.h" | 8 #include "net/base/net_export.h" |
9 #include "net/http/http_cache.h" | 9 #include "net/http/http_cache.h" |
10 #include "net/http/http_cache_transaction.h" | 10 #include "net/http/http_cache_transaction.h" |
11 #include "net/spdy/server_push_delegate.h" | 11 #include "net/spdy/chromium/server_push_delegate.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // An implementation of ServerPushDelegate that issues an HttpCache::Transaction | 15 // An implementation of ServerPushDelegate that issues an HttpCache::Transaction |
16 // to lookup whether the response to the pushed URL is cached and cancel the | 16 // to lookup whether the response to the pushed URL is cached and cancel the |
17 // push in that case. | 17 // push in that case. |
18 class NET_EXPORT_PRIVATE HttpCacheLookupManager : public ServerPushDelegate { | 18 class NET_EXPORT_PRIVATE HttpCacheLookupManager : public ServerPushDelegate { |
19 public: | 19 public: |
20 // |http_cache| MUST outlive the HttpCacheLookupManager. | 20 // |http_cache| MUST outlive the HttpCacheLookupManager. |
21 explicit HttpCacheLookupManager(HttpCache* http_cache); | 21 explicit HttpCacheLookupManager(HttpCache* http_cache); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 // HttpCache must outlive the HttpCacheLookupManager. | 57 // HttpCache must outlive the HttpCacheLookupManager. |
58 HttpCache* http_cache_; | 58 HttpCache* http_cache_; |
59 std::map<GURL, std::unique_ptr<LookupTransaction>> lookup_transactions_; | 59 std::map<GURL, std::unique_ptr<LookupTransaction>> lookup_transactions_; |
60 base::WeakPtrFactory<HttpCacheLookupManager> weak_factory_; | 60 base::WeakPtrFactory<HttpCacheLookupManager> weak_factory_; |
61 }; | 61 }; |
62 | 62 |
63 } // namespace net | 63 } // namespace net |
64 | 64 |
65 #endif // NET_HTTP_HTTP_CACHE_LOOKUP_MANAGER_H_ | 65 #endif // NET_HTTP_HTTP_CACHE_LOOKUP_MANAGER_H_ |
OLD | NEW |