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..e6af2b7f1afcc4ec64e13770bc4ff8a8cf39d6bc 100644 |
--- a/net/http/http_cache_lookup_manager.h |
+++ b/net/http/http_cache_lookup_manager.h |
@@ -18,11 +18,13 @@ 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); |
eroman
2017/02/10 23:57:47
I don't believe this |net_log| parameter is needed
Zhongyi Shi
2017/02/11 02:21:11
Done.
|
~HttpCacheLookupManager() override; |
- void OnPush(std::unique_ptr<ServerPushHelper> push_helper) override; |
+ // ServerPushDelegate implementation. |
+ // |source_net_log| is owned by the caller of this method. |
eroman
2017/02/10 23:57:47
Can you re-phrase the comment a bit? "owned" doesn
Zhongyi Shi
2017/02/11 02:21:10
Yup, this will always be called from a session: ei
|
+ void OnPush(std::unique_ptr<ServerPushHelper> push_helper, |
+ const NetLogWithSource& source_net_log) override; |
// 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 +36,27 @@ 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. |
+ // |source_net_log| is owned by the requester of server push cache lookup. |
eroman
2017/02/10 23:57:47
Same comment as earlier regarding comment + parame
Zhongyi Shi
2017/02/11 02:21:10
Done.
|
int StartLookup(HttpCache* cache, |
const CompletionCallback& callback, |
- const NetLogWithSource& net_log); |
+ const NetLogWithSource& source_net_log); |
- 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_; |
eroman
2017/02/10 23:57:47
Per comment above, I believe we delete this.
Zhongyi Shi
2017/02/11 02:21:10
Done.
|
// HttpCache must outlive the HttpCacheLookupManager. |
HttpCache* http_cache_; |
std::map<GURL, std::unique_ptr<LookupTransaction>> lookup_transactions_; |