Index: net/http/http_cache_lookup_manager.h |
diff --git a/net/http/http_cache_lookup_manager.h b/net/http/http_cache_lookup_manager.h |
index 45cfa009ac65d476a5c4b80c2bd1943e9135212a..e9b7ab11a3b80dae47439265210aa6983c55c2b2 100644 |
--- a/net/http/http_cache_lookup_manager.h |
+++ b/net/http/http_cache_lookup_manager.h |
@@ -18,11 +18,11 @@ namespace net { |
class NET_EXPORT_PRIVATE HttpCacheLookupManager : public ServerPushDelegate { |
public: |
// |http_cache| MUST outlive the HttpCacheLookupManager. |
- HttpCacheLookupManager(HttpCache* http_cache, |
- const NetLogWithSource& net_log); |
+ HttpCacheLookupManager(HttpCache* http_cache, NetLog* net_log); |
~HttpCacheLookupManager() override; |
- void OnPush(std::unique_ptr<ServerPushHelper> push_helper) override; |
+ void OnPush(std::unique_ptr<ServerPushHelper> push_helper, |
+ const NetLogWithSource& net_log) override; |
Ryan Hamilton
2017/02/07 15:22:58
nit: can you add:
// ServerPushDelegate implement
Zhongyi Shi
2017/02/07 19:08:22
Done.
|
// Invoked when the HttpCache::Transaction for |url| finishes to cancel the |
// server push if the response to the server push is found cached. |
@@ -34,24 +34,26 @@ class NET_EXPORT_PRIVATE HttpCacheLookupManager : public ServerPushDelegate { |
// push. |
class LookupTransaction { |
public: |
- LookupTransaction(std::unique_ptr<ServerPushHelper> push_helper); |
+ LookupTransaction(std::unique_ptr<ServerPushHelper> push_helper, |
+ NetLog* net_log); |
~LookupTransaction(); |
// Issues an HttpCache::Transaction to lookup whether the response is cached |
// without header validation. |
int StartLookup(HttpCache* cache, |
const CompletionCallback& callback, |
- const NetLogWithSource& net_log); |
+ const NetLogWithSource& source); |
Ryan Hamilton
2017/02/07 15:22:58
nit: net_log
Zhongyi Shi
2017/02/07 19:08:22
Done.
|
- void CancelPush(); |
+ void OnLookupComplete(bool found_in_cache); |
private: |
std::unique_ptr<ServerPushHelper> push_helper_; |
std::unique_ptr<HttpRequestInfo> request_; |
std::unique_ptr<HttpTransaction> transaction_; |
+ const NetLogWithSource net_log_; |
}; |
- NetLogWithSource net_log_; |
+ NetLog* net_log_; |
// HttpCache must outlive the HttpCacheLookupManager. |
HttpCache* http_cache_; |
std::map<GURL, std::unique_ptr<LookupTransaction>> lookup_transactions_; |