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

Unified Diff: net/http/http_cache_lookup_manager.h

Issue 2675343002: Server push cancellation: add NetLogs to track cache lookup transaction (Closed)
Patch Set: self review 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') | net/http/http_cache_lookup_manager.cc » ('J')
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..811541f1f9d7856f6f4f12f87d75e4c67cc5bd93 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);
Ryan Hamilton 2017/02/06 23:34:55 What creates an instance of this class? I don't se
Zhongyi Shi 2017/02/07 00:00:24 It should be in the HttpCache's constructor. I hav
Ryan Hamilton 2017/02/07 00:10:49 Oh, I thought this was already wired up because of
Zhongyi Shi 2017/02/07 06:01:09 As discussed offline, this CL will have minimal ef
~HttpCacheLookupManager() override;
- void OnPush(std::unique_ptr<ServerPushHelper> push_helper) override;
+ void OnPush(std::unique_ptr<ServerPushHelper> push_helper,
+ const NetLogWithSource& source) override;
Ryan Hamilton 2017/02/06 23:34:55 nit: parameters of type NetLogWithSource are typic
Zhongyi Shi 2017/02/07 06:01:08 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,14 +34,15 @@ 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);
void CancelPush();
@@ -49,10 +50,11 @@ class NET_EXPORT_PRIVATE HttpCacheLookupManager : public ServerPushDelegate {
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.
+ NetLog* net_log_;
Ryan Hamilton 2017/02/06 23:34:55 I think this should probably not come between |htt
Zhongyi Shi 2017/02/07 06:01:08 Done.
HttpCache* http_cache_;
std::map<GURL, std::unique_ptr<LookupTransaction>> lookup_transactions_;
base::WeakPtrFactory<HttpCacheLookupManager> weak_factory_;
« no previous file with comments | « no previous file | net/http/http_cache_lookup_manager.cc » ('j') | net/http/http_cache_lookup_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698