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

Unified Diff: net/http/http_cache_lookup_manager.h

Issue 2675343002: Server push cancellation: add NetLogs to track cache lookup transaction (Closed)
Patch Set: fix typo Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_cache_lookup_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..59b70b626428188428f142892323d09daca83934 100644
--- a/net/http/http_cache_lookup_manager.h
+++ b/net/http/http_cache_lookup_manager.h
@@ -18,11 +18,12 @@ 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);
~HttpCacheLookupManager() override;
- void OnPush(std::unique_ptr<ServerPushHelper> push_helper) override;
+ // ServerPushDelegate implementation.
+ void OnPush(std::unique_ptr<ServerPushHelper> push_helper,
+ const NetLogWithSource& session_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 +35,25 @@ 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& session_net_log);
- void CancelPush();
+ void OnLookupComplete(int result);
private:
std::unique_ptr<ServerPushHelper> push_helper_;
std::unique_ptr<HttpRequestInfo> request_;
std::unique_ptr<HttpTransaction> transaction_;
+ const NetLogWithSource net_log_;
};
- NetLogWithSource net_log_;
// HttpCache must outlive the HttpCacheLookupManager.
HttpCache* http_cache_;
std::map<GURL, std::unique_ptr<LookupTransaction>> lookup_transactions_;
« no previous file with comments | « no previous file | net/http/http_cache_lookup_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698