Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_SERVER_PUSH_DELEGATE_H_ | |
| 6 #define NET_SPDY_SERVER_PUSH_DELEGATE_H_ | |
| 7 | |
| 8 #include "net/base/net_export.h" | |
| 9 #include "url/gurl.h" | |
| 10 | |
| 11 namespace net { | |
| 12 | |
| 13 class NET_EXPORT ServerPushDelegate { | |
|
Ryan Hamilton
2016/11/08 22:27:01
Nit: Class comment, please.
NET_EXPORT or NET_EXP
Zhongyi Shi
2016/11/09 19:07:41
Done.
| |
| 14 public: | |
| 15 // An interface to a class that reflects information on the pushed request. | |
| 16 class NET_EXPORT ServerPushHelper { | |
| 17 public: | |
| 18 virtual ~ServerPushHelper() {} | |
| 19 | |
| 20 // Cancels the push if it is not claimed yet. | |
| 21 virtual void Cancel() = 0; | |
| 22 | |
| 23 // Gets the URL of the pushed request. | |
| 24 virtual const GURL& GetURL() = 0; | |
| 25 }; | |
| 26 | |
| 27 virtual ~ServerPushDelegate() {} | |
| 28 | |
| 29 // Invoked by session when a push promise has been received. | |
| 30 virtual void OnPush(std::unique_ptr<ServerPushHelper> push_helper) = 0; | |
| 31 }; | |
| 32 | |
| 33 } // namespace net | |
| 34 | |
| 35 #endif // NET_SPDY_PUSH_DELEGATE_H_ | |
| OLD | NEW |