| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ | 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_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 12 #include "net/url_request/url_request_context_getter.h" | 13 #include "net/url_request/url_request_context_getter.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace net { | 19 namespace net { |
| 19 class CertVerifier; | 20 class CertVerifier; |
| 20 class URLRequestContext; | 21 class URLRequestContext; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 43 private: | 44 private: |
| 44 class CertVerifier; | 45 class CertVerifier; |
| 45 | 46 |
| 46 void InitOnNetThread(); | 47 void InitOnNetThread(); |
| 47 void AddPairedHostOnNetThread( | 48 void AddPairedHostOnNetThread( |
| 48 const std::string& host, | 49 const std::string& host, |
| 49 const net::SHA256HashValue& certificate_fingerprint); | 50 const net::SHA256HashValue& certificate_fingerprint); |
| 50 | 51 |
| 51 // Owned by context_ | 52 // Owned by context_ |
| 52 CertVerifier* cert_verifier_ = nullptr; | 53 CertVerifier* cert_verifier_ = nullptr; |
| 53 scoped_ptr<net::URLRequestContext> context_; | 54 std::unique_ptr<net::URLRequestContext> context_; |
| 54 | 55 |
| 55 scoped_refptr<base::SingleThreadTaskRunner> net_task_runner_; | 56 scoped_refptr<base::SingleThreadTaskRunner> net_task_runner_; |
| 56 | 57 |
| 57 base::WeakPtrFactory<PrivetV3ContextGetter> weak_ptr_factory_; | 58 base::WeakPtrFactory<PrivetV3ContextGetter> weak_ptr_factory_; |
| 58 | 59 |
| 59 DISALLOW_COPY_AND_ASSIGN(PrivetV3ContextGetter); | 60 DISALLOW_COPY_AND_ASSIGN(PrivetV3ContextGetter); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace extensions | 63 } // namespace extensions |
| 63 | 64 |
| 64 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ | 65 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_PRIVET_V3_CONTEXT_GETTER_H_ |
| OLD | NEW |