| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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 BLIMP_ENGINE_APP_BLIMP_NETWORK_DELEGATE_H_ | |
| 6 #define BLIMP_ENGINE_APP_BLIMP_NETWORK_DELEGATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "net/base/network_delegate_impl.h" | |
| 12 | |
| 13 namespace blimp { | |
| 14 namespace engine { | |
| 15 | |
| 16 class BlimpNetworkDelegate : public net::NetworkDelegateImpl { | |
| 17 public: | |
| 18 BlimpNetworkDelegate(); | |
| 19 ~BlimpNetworkDelegate() override; | |
| 20 | |
| 21 // Affects subsequent cookie retrieval and setting. | |
| 22 static void SetAcceptAllCookies(bool accept); | |
| 23 | |
| 24 private: | |
| 25 // net::NetworkDelegate implementation. | |
| 26 bool OnCanGetCookies(const net::URLRequest& request, | |
| 27 const net::CookieList& cookie_list) override; | |
| 28 bool OnCanSetCookie(const net::URLRequest& request, | |
| 29 const std::string& cookie_line, | |
| 30 net::CookieOptions* options) override; | |
| 31 | |
| 32 DISALLOW_COPY_AND_ASSIGN(BlimpNetworkDelegate); | |
| 33 }; | |
| 34 | |
| 35 } // namespace engine | |
| 36 } // namespace blimp | |
| 37 | |
| 38 #endif // BLIMP_ENGINE_APP_BLIMP_NETWORK_DELEGATE_H_ | |
| OLD | NEW |