gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
gunsch | f44ffcb | 2014-10-13 23:01:45 | [diff] [blame] | 5 | #include "chromecast/browser/cast_network_delegate.h" |
gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 6 | |
| 7 | #include "base/macros.h" |
ryanchung | 863d7e5 | 2017-06-20 01:23:09 | [diff] [blame] | 8 | #include "base/memory/ptr_util.h" |
| 9 | #include "net/cert/x509_certificate.h" |
| 10 | #include "net/ssl/ssl_private_key.h" |
gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 11 | #include "url/gurl.h" |
| 12 | |
| 13 | namespace chromecast { |
| 14 | namespace shell { |
| 15 | |
| 16 | namespace { |
| 17 | |
| 18 | class CastNetworkDelegateSimple : public CastNetworkDelegate { |
| 19 | public: |
| 20 | CastNetworkDelegateSimple() {} |
| 21 | |
| 22 | private: |
| 23 | // CastNetworkDelegate implementation: |
ryanchung | 863d7e5 | 2017-06-20 01:23:09 | [diff] [blame] | 24 | void Initialize() override {} |
gunsch | 7f9fc223 | 2015-01-06 20:20:02 | [diff] [blame] | 25 | bool IsWhitelisted(const GURL& gurl, int render_process_id, |
| 26 | bool for_device_auth) const override { |
gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 27 | return false; |
| 28 | } |
| 29 | |
| 30 | DISALLOW_COPY_AND_ASSIGN(CastNetworkDelegateSimple); |
| 31 | }; |
| 32 | |
| 33 | } // namespace |
| 34 | |
| 35 | // static |
ryanchung | 863d7e5 | 2017-06-20 01:23:09 | [diff] [blame] | 36 | std::unique_ptr<CastNetworkDelegate> CastNetworkDelegate::Create() { |
| 37 | return base::MakeUnique<CastNetworkDelegateSimple>(); |
gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | // static |
ryanchung | 863d7e5 | 2017-06-20 01:23:09 | [diff] [blame] | 41 | scoped_refptr<net::X509Certificate> CastNetworkDelegate::DeviceCert() { |
| 42 | return nullptr; |
gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 43 | } |
| 44 | |
mattm | 436ccfe | 2017-06-19 20:24:08 | [diff] [blame] | 45 | // static |
ryanchung | 863d7e5 | 2017-06-20 01:23:09 | [diff] [blame] | 46 | scoped_refptr<net::SSLPrivateKey> CastNetworkDelegate::DeviceKey() { |
| 47 | return nullptr; |
mattm | 436ccfe | 2017-06-19 20:24:08 | [diff] [blame] | 48 | } |
| 49 | |
gunsch | dacd4f6f | 2014-09-27 00:01:10 | [diff] [blame] | 50 | } // namespace shell |
| 51 | } // namespace chromecast |