| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ |
| 6 #define CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ | 6 #define CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "net/base/network_delegate_impl.h" | 8 #include "net/base/network_delegate_impl.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 class SSLPrivateKey; |
| 11 class X509Certificate; | 12 class X509Certificate; |
| 12 } | 13 } |
| 13 | 14 |
| 14 namespace chromecast { | 15 namespace chromecast { |
| 15 namespace shell { | 16 namespace shell { |
| 16 | 17 |
| 17 class CastNetworkDelegate : public net::NetworkDelegateImpl { | 18 class CastNetworkDelegate : public net::NetworkDelegateImpl { |
| 18 public: | 19 public: |
| 19 static CastNetworkDelegate* Create(); | 20 static CastNetworkDelegate* Create(); |
| 20 static net::X509Certificate* DeviceCert(); | 21 static net::X509Certificate* DeviceCert(); |
| 22 static net::SSLPrivateKey* DeviceKey(); |
| 21 | 23 |
| 22 CastNetworkDelegate(); | 24 CastNetworkDelegate(); |
| 23 ~CastNetworkDelegate() override; | 25 ~CastNetworkDelegate() override; |
| 24 | 26 |
| 25 virtual void Initialize(bool use_sync_signing) = 0; | 27 virtual void Initialize(bool use_sync_signing) = 0; |
| 26 | 28 |
| 27 virtual bool IsWhitelisted(const GURL& gurl, int render_process_id, | 29 virtual bool IsWhitelisted(const GURL& gurl, int render_process_id, |
| 28 bool for_device_auth) const = 0; | 30 bool for_device_auth) const = 0; |
| 29 | 31 |
| 30 private: | 32 private: |
| 31 // net::NetworkDelegate implementation: | 33 // net::NetworkDelegate implementation: |
| 32 bool OnCanAccessFile(const net::URLRequest& request, | 34 bool OnCanAccessFile(const net::URLRequest& request, |
| 33 const base::FilePath& path) const override; | 35 const base::FilePath& path) const override; |
| 34 | 36 |
| 35 DISALLOW_COPY_AND_ASSIGN(CastNetworkDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(CastNetworkDelegate); |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 } // namespace shell | 40 } // namespace shell |
| 39 } // namespace chromecast | 41 } // namespace chromecast |
| 40 | 42 |
| 41 #endif // CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ | 43 #endif // CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ |
| OLD | NEW |