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

Side by Side Diff: net/spdy/push_delegate.h

Issue 2458793002: Server push cancellation: add PushPromiseHelper which reflects information on the push promise. (Closed)
Patch Set: add PushDelegate 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_SPDY_PUSH_DELEGATE_H_
6 #define NET_SPDY_PUSH_DELEGATE_H_
7
8 #include "net/base/net_export.h"
9 #include "url/gurl.h"
10
11 namespace net {
12
13 // An interface to a class that reflects information on the pushed request.
14 class NET_EXPORT PushPromiseHelper {
Ryan Hamilton 2016/10/28 00:32:22 This class exists to be used by the delegate, righ
Zhongyi Shi 2016/11/07 22:07:03 Done.
15 public:
16 virtual ~PushPromiseHelper() {}
17
18 // Cancels the push if it is not claimed yet.
19 virtual void Cancel() = 0;
20
21 // Gets the URL of the pushed request.
22 virtual const GURL& GetURL() = 0;
23 };
24
25 class NET_EXPORT PushDelegate {
26 public:
27 virtual ~PushDelegate() {}
28
29 // Invoked by session when a push promise has been received.
30 virtual void OnPush(std::unique_ptr<PushPromiseHelper> push_promise) = 0;
Ryan Hamilton 2016/10/28 00:32:22 Instead of putting the URL into the Helper and the
Zhongyi Shi 2016/11/07 22:07:03 There would be only one implementation of PushDele
Ryan Hamilton 2016/11/08 22:27:01 But both places OnPush() is called, the URL is sit
31 };
32
33 } // namespace net
34
35 #endif // NET_SPDY_PUSH_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698