Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SPDY_SPDY_TEST_UTILS_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTILS_H_ |
| 6 #define NET_SPDY_SPDY_TEST_UTILS_H_ | 6 #define NET_SPDY_SPDY_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 DISALLOW_COPY_AND_ASSIGN(TestHeadersHandler); | 86 DISALLOW_COPY_AND_ASSIGN(TestHeadersHandler); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 // A test implementation of ServerPushDelegate that caches all the pushed | 89 // A test implementation of ServerPushDelegate that caches all the pushed |
| 90 // request and provides a interface to cancel the push given url. | 90 // request and provides a interface to cancel the push given url. |
| 91 class TestServerPushDelegate : public ServerPushDelegate { | 91 class TestServerPushDelegate : public ServerPushDelegate { |
| 92 public: | 92 public: |
| 93 explicit TestServerPushDelegate(); | 93 explicit TestServerPushDelegate(); |
| 94 ~TestServerPushDelegate() override; | 94 ~TestServerPushDelegate() override; |
| 95 | 95 |
| 96 void OnPush(std::unique_ptr<ServerPushHelper> push_helper) override; | 96 void OnPush(std::unique_ptr<ServerPushHelper> push_helper, |
| 97 const NetLogWithSource& source) override; | |
|
eroman
2017/02/10 23:57:47
Consistency: in the other implementation overrides
Zhongyi Shi
2017/02/11 02:21:11
Done.
| |
| 97 | 98 |
| 98 bool CancelPush(GURL url); | 99 bool CancelPush(GURL url); |
| 99 | 100 |
| 100 private: | 101 private: |
| 101 std::map<GURL, std::unique_ptr<ServerPushHelper>> push_helpers; | 102 std::map<GURL, std::unique_ptr<ServerPushHelper>> push_helpers; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace test | 105 } // namespace test |
| 105 } // namespace net | 106 } // namespace net |
| 106 | 107 |
| 107 #endif // NET_SPDY_SPDY_TEST_UTILS_H_ | 108 #endif // NET_SPDY_SPDY_TEST_UTILS_H_ |
| OLD | NEW |