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 CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/single_thread_task_runner.h" |
| 11 #include "net/url_request/url_request_context_getter.h" |
| 12 |
| 13 namespace base { |
| 14 class SingleThreadTaskRunner; |
| 15 } |
| 16 |
| 17 namespace net { |
| 18 class CertVerifier; |
| 19 class URLRequestContext; |
| 20 struct SHA256HashValue; |
| 21 } |
| 22 |
| 23 namespace extensions { |
| 24 |
| 25 class PrivetV3ContextGetter : public net::URLRequestContextGetter { |
| 26 public: |
| 27 PrivetV3ContextGetter( |
| 28 const scoped_refptr<base::SingleThreadTaskRunner>& net_task_runner, |
| 29 const net::SHA256HashValue& certificate_fingerprint); |
| 30 |
| 31 net::URLRequestContext* GetURLRequestContext() override; |
| 32 |
| 33 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
| 34 const override; |
| 35 |
| 36 protected: |
| 37 ~PrivetV3ContextGetter() override; |
| 38 |
| 39 private: |
| 40 scoped_ptr<net::CertVerifier> verifier_; |
| 41 scoped_ptr<net::URLRequestContext> context_; |
| 42 scoped_refptr<base::SingleThreadTaskRunner> net_task_runner_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(PrivetV3ContextGetter); |
| 45 }; |
| 46 |
| 47 } // namespace extensions |
| 48 |
| 49 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ |
OLD | NEW |