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

Side by Side Diff: net/quic/core/quic_client_promised_info.h

Issue 2458793002: Server push cancellation: add PushPromiseHelper which reflects information on the push promise. (Closed)
Patch Set: sync and fix tests Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_QUIC_QUIC_CLIENT_PROMISED_INFO_H_ 5 #ifndef NET_QUIC_QUIC_CLIENT_PROMISED_INFO_H_
6 #define NET_QUIC_QUIC_CLIENT_PROMISED_INFO_H_ 6 #define NET_QUIC_QUIC_CLIENT_PROMISED_INFO_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // field list), the promise headers (taking the role of the "cached" 71 // field list), the promise headers (taking the role of the "cached"
72 // request), and the client request headers. 72 // request), and the client request headers.
73 SpdyHeaderBlock* request_headers() { return request_headers_.get(); } 73 SpdyHeaderBlock* request_headers() { return request_headers_.get(); }
74 74
75 SpdyHeaderBlock* response_headers() { return response_headers_.get(); } 75 SpdyHeaderBlock* response_headers() { return response_headers_.get(); }
76 76
77 QuicStreamId id() const { return id_; } 77 QuicStreamId id() const { return id_; }
78 78
79 const std::string url() const { return url_; } 79 const std::string url() const { return url_; }
80 80
81 // Return true if there's a request pending matching this push promise.
82 bool is_validating() const { return client_request_delegate_ != nullptr; }
83
81 private: 84 private:
82 friend class test::QuicClientPromisedInfoPeer; 85 friend class test::QuicClientPromisedInfoPeer;
83 86
84 class CleanupAlarm : public QuicAlarm::Delegate { 87 class CleanupAlarm : public QuicAlarm::Delegate {
85 public: 88 public:
86 explicit CleanupAlarm(QuicClientPromisedInfo* promised) 89 explicit CleanupAlarm(QuicClientPromisedInfo* promised)
87 : promised_(promised) {} 90 : promised_(promised) {}
88 91
89 void OnAlarm() override; 92 void OnAlarm() override;
90 93
(...skipping 13 matching lines...) Expand all
104 // The promise will commit suicide eventually if it is not claimed 107 // The promise will commit suicide eventually if it is not claimed
105 // by a GET first. 108 // by a GET first.
106 std::unique_ptr<QuicAlarm> cleanup_alarm_; 109 std::unique_ptr<QuicAlarm> cleanup_alarm_;
107 110
108 DISALLOW_COPY_AND_ASSIGN(QuicClientPromisedInfo); 111 DISALLOW_COPY_AND_ASSIGN(QuicClientPromisedInfo);
109 }; 112 };
110 113
111 } // namespace net 114 } // namespace net
112 115
113 #endif // NET_QUIC_QUIC_CLIENT_PROMISED_INFO_H_ 116 #endif // NET_QUIC_QUIC_CLIENT_PROMISED_INFO_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session_test.cc ('k') | net/quic/core/quic_client_promised_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698